mirror of
https://github.com/iconify/iconify.git
synced 2024-11-13 00:06:29 +00:00
22 lines
480 B
TypeScript
22 lines
480 B
TypeScript
import type { Config } from '@jest/types'
|
|
|
|
// see https://jestjs.io/docs/ecmascript-modules
|
|
|
|
export const buildConfiguration = (configuration: Partial<Config.InitialOptions>): Config.InitialOptions => {
|
|
return Object.assign({}, {
|
|
verbose: true,
|
|
testEnvironment: 'node',
|
|
moduleDirectories: [
|
|
'node_modules',
|
|
'src',
|
|
],
|
|
extensionsToTreatAsEsm: ['.ts'],
|
|
transform: {
|
|
'^.+\\.ts$': 'ts-jest',
|
|
},
|
|
testMatch: [
|
|
'**/tests/*-test.ts',
|
|
],
|
|
}, configuration)
|
|
}
|