mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
76794ac27a
* chore: add additional testing to esm and cjs smoke * test: updated test suite to include module tests * fix: esm test smoke import * fix: cubic feedback * fix: failing cjs * fix: cjs timeout
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
import { describe, expect, it } from 'vitest';
|
|
import axios, { CanceledError, AxiosError, AxiosHeaders } from 'axios';
|
|
import settle from 'axios/unsafe/core/settle.js';
|
|
|
|
describe('ESM importing', () => {
|
|
it('should import axios', () => {
|
|
expect(typeof axios).toStrictEqual('function');
|
|
});
|
|
|
|
it('should import CanceledError', () => {
|
|
expect(typeof CanceledError).toStrictEqual('function');
|
|
});
|
|
|
|
it('should import AxiosError', () => {
|
|
expect(typeof AxiosError).toStrictEqual('function');
|
|
});
|
|
|
|
it('should import AxiosHeaders', () => {
|
|
expect(typeof AxiosHeaders).toStrictEqual('function');
|
|
});
|
|
|
|
it('should import settle', () => {
|
|
expect(typeof settle).toStrictEqual('function');
|
|
});
|
|
|
|
it('should import CanceledError from axios', () => {
|
|
expect(axios.CanceledError).toStrictEqual(CanceledError);
|
|
});
|
|
|
|
it('should import AxiosError from axios', () => {
|
|
expect(axios.AxiosError).toStrictEqual(AxiosError);
|
|
});
|
|
|
|
it('should import AxiosHeaders from axios', () => {
|
|
expect(axios.AxiosHeaders).toStrictEqual(AxiosHeaders);
|
|
});
|
|
});
|