refactor: better tests

This commit is contained in:
Arthur Fiorette 2024-05-21 13:03:39 -03:00
parent e7976e8025
commit d72f8d00d3
No known key found for this signature in database
GPG Key ID: 79FA8EC214FA0233

View File

@ -16,7 +16,7 @@ export function mockAxios(
// Axios interceptors are a stack, so apply this after the cache interceptor // Axios interceptors are a stack, so apply this after the cache interceptor
axios.defaults.adapter = async (config) => { axios.defaults.adapter = async (config) => {
// Simply wait for 1ms to simulate a network request // Simply wait for 1ms to simulate a network request
await setTimeout(1); await setTimeout(50);
const should304: unknown = const should304: unknown =
config.headers?.[Header.IfNoneMatch] || config.headers?.[Header.IfModifiedSince]; config.headers?.[Header.IfNoneMatch] || config.headers?.[Header.IfModifiedSince];