mirror of
https://github.com/iconify/collections-json.git
synced 2024-11-22 04:25:11 +00:00
test: use cjs config on esm config
This commit is contained in:
parent
dd6cd14f14
commit
7898d72798
@ -1,28 +1,9 @@
|
|||||||
import type { Config } from '@jest/types'
|
import config from './jest.config.cjs'
|
||||||
|
|
||||||
// see https://jestjs.io/docs/ecmascript-modules
|
config.globals = {
|
||||||
|
|
||||||
// Sync object
|
|
||||||
const config: Config.InitialOptions = {
|
|
||||||
verbose: true,
|
|
||||||
testMatch: [
|
|
||||||
'**/__tests__/**/*.+(ts|tsx|js)',
|
|
||||||
'**/?(*.)+(spec|test).+(ts|tsx|js)',
|
|
||||||
],
|
|
||||||
moduleDirectories: [
|
|
||||||
'node_modules',
|
|
||||||
'src',
|
|
||||||
],
|
|
||||||
moduleFileExtensions: ['ts', 'js'],
|
|
||||||
extensionsToTreatAsEsm: ['.ts'],
|
|
||||||
transform: {
|
|
||||||
'^.+\\.ts$': 'ts-jest',
|
|
||||||
},
|
|
||||||
globals: {
|
|
||||||
'ts-jest': {
|
'ts-jest': {
|
||||||
useESM: true,
|
useESM: true,
|
||||||
},
|
},
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default config
|
export default config
|
||||||
|
Loading…
Reference in New Issue
Block a user