mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2025-12-08 17:36:16 +00:00
refactor: better tests
This commit is contained in:
parent
e7976e8025
commit
d72f8d00d3
@ -16,7 +16,7 @@ export function mockAxios(
|
||||
// Axios interceptors are a stack, so apply this after the cache interceptor
|
||||
axios.defaults.adapter = async (config) => {
|
||||
// Simply wait for 1ms to simulate a network request
|
||||
await setTimeout(1);
|
||||
await setTimeout(50);
|
||||
|
||||
const should304: unknown =
|
||||
config.headers?.[Header.IfNoneMatch] || config.headers?.[Header.IfModifiedSince];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user