2
0
mirror of https://github.com/iconify/iconify.git synced 2024-11-10 07:11:00 +00:00
iconify/packages/utils/jest.shared.config.ts

22 lines
480 B
TypeScript
Raw Normal View History

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)
}