mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2025-12-08 17:36:16 +00:00
15 lines
456 B
TypeScript
15 lines
456 B
TypeScript
import Axios from 'axios';
|
|
import { createCache } from '../../src/cache/create';
|
|
|
|
describe('tests header interpreter', () => {
|
|
it('tests argument composition', () => {
|
|
const axios = Axios.create();
|
|
const withAxios = createCache(axios);
|
|
expect(withAxios).not.toBeUndefined();
|
|
|
|
const withConfig = createCache(axios, { ttl: 1234 });
|
|
expect(withConfig).not.toBeUndefined();
|
|
expect(withConfig.defaults.cache.ttl).toBe(1234);
|
|
});
|
|
});
|