mirror of
https://github.com/simoneb/axios-hooks.git
synced 2025-12-08 21:25:56 +00:00
See README for details about how to use the feature: https://github.com/simoneb/axios-hooks/#multiple-hook-instances fix #98
32 lines
655 B
JavaScript
32 lines
655 B
JavaScript
const commonOptions = {
|
|
resetMocks: true,
|
|
coverageDirectory: 'coverage'
|
|
}
|
|
|
|
const projects = [
|
|
{
|
|
displayName: 'js',
|
|
testMatch: ['**/?(*.)+(spec|test).js?(x)']
|
|
},
|
|
{
|
|
displayName: 'ts',
|
|
testMatch: ['**/?(*.)+(spec|test).ts?(x)'],
|
|
preset: 'ts-jest/presets/js-with-ts'
|
|
},
|
|
{
|
|
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 }))
|
|
}
|