mirror of
https://github.com/simoneb/axios-hooks.git
synced 2025-12-08 21:25:56 +00:00
* feat: update to support axios 1.x Updated the following packages too: - LRUCache - jest - ts-jest - prettier - typescript * feat: migrate from legacy cancel token to abort controller * chore: update axios peer dependency --------- Co-authored-by: Mark Hebden <mark.hebden@airelogic.com>
34 lines
715 B
JavaScript
34 lines
715 B
JavaScript
const commonOptions = {
|
|
resetMocks: true,
|
|
coverageDirectory: 'coverage'
|
|
}
|
|
|
|
const projects = [
|
|
{
|
|
displayName: 'js',
|
|
testMatch: ['**/?(*.)+(spec|test).js?(x)'],
|
|
testEnvironment: 'jsdom'
|
|
},
|
|
{
|
|
displayName: 'ts',
|
|
testMatch: ['**/?(*.)+(spec|test).ts?(x)'],
|
|
preset: 'ts-jest/presets/js-with-ts',
|
|
testEnvironment: 'jsdom'
|
|
},
|
|
{
|
|
displayName: 'ssr-js',
|
|
testMatch: ['**/?(*.)+(spec|test).ssr.js?(x)'],
|
|
testEnvironment: 'node'
|
|
},
|
|
{
|
|
displayName: 'ssr-ts',
|
|
testMatch: ['**/?(*.)+(spec|test).ssr.ts?(x)'],
|
|
preset: 'ts-jest/presets/js-with-ts',
|
|
testEnvironment: 'node'
|
|
}
|
|
]
|
|
|
|
module.exports = {
|
|
projects: projects.map(p => ({ ...p, ...commonOptions }))
|
|
}
|