Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test('presets', () => {
const presetKeys = ['transform']
expect(Object.keys(presets.defaults)).toEqual(presetKeys)
expect(presets.defaults).toEqual(require('ts-jest/presets/default/jest-preset'))
expect(presets.defaults).toEqual(require('ts-jest/jest-preset'))
expect(Object.keys(presets.jsWithTs)).toEqual(presetKeys)
expect(presets.jsWithTs).toEqual(require('ts-jest/presets/js-with-ts/jest-preset'))
expect(Object.keys(presets.jsWithBabel)).toEqual(presetKeys)
expect(presets.jsWithBabel).toEqual(require('ts-jest/presets/js-with-babel/jest-preset'))
})
test('presets', () => {
const presetKeys = ['transform']
expect(Object.keys(presets.defaults)).toEqual(presetKeys)
expect(presets.defaults).toEqual(require('ts-jest/presets/default/jest-preset'))
expect(presets.defaults).toEqual(require('ts-jest/jest-preset'))
expect(Object.keys(presets.jsWithTs)).toEqual(presetKeys)
expect(presets.jsWithTs).toEqual(require('ts-jest/presets/js-with-ts/jest-preset'))
expect(Object.keys(presets.jsWithBabel)).toEqual(presetKeys)
expect(presets.jsWithBabel).toEqual(require('ts-jest/presets/js-with-babel/jest-preset'))
})
const cfg = {}
if (require('jest/package.json').version.split('.').shift() === '22') {
Object.assign(cfg, require('ts-jest/presets').defaults)
} else {
cfg.preset = 'ts-jest'
}
module.exports = Object.assign({}, cfg, {
collectCoverage: true,
collectCoverageFrom: ["**/*.ts", "!**/*.d.ts", "!**/build/**", "!/FrontEnd/**"],
forceCoverageMatch: ["**/*.test.ts"],
coverageDirectory: "Tests/coverage",
coverageReporters: ["lcov"],
rootDir: "..",
testMatch: ["**/*.test.ts"],
testEnvironment: "node",
globals: {
"ts-jest": {
tsConfig: "./tsconfig.json",
const presets = require('ts-jest/presets')
module.exports = Object.assign({}, presets.defaults, {
testEnvironment: 'node',
globals: { 'ts-jest': { tsConfig: {} } },
})