1
0
mirror of synced 2025-12-19 18:11:23 -05:00
Files
blitz/jest.config.js
Brandon Bayer 2880fbba30 Switch from tsdx to preconstruct for DX/perf improvements (meta) (#2013)
* switch to preconstruct - still some issues

* working!

* cleanup

* updates

* use preconstruct for blitz package

* most tests working

* fix tests

* cleanup

* fix build script

* remove lodash from core

* fix

* fix example tests

* cleanup lodash

* cleanup

* clenaup

* fix another way

* fix lint
2021-02-28 01:30:16 +00:00

38 lines
1.2 KiB
JavaScript

module.exports = {
preset: "ts-jest",
testEnvironment: "node",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
modulePathIgnorePatterns: ["<rootDir>/tmp", "<rootDir>/dist", "<rootDir>/templates"],
moduleNameMapper: {},
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
transform: {
".(ts|tsx)$": require.resolve("ts-jest/dist"),
".(js|jsx)$": require.resolve("babel-jest"), // jest's default
},
transformIgnorePatterns: ["[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"],
testMatch: ["<rootDir>/**/*.(spec|test).{ts,tsx,js,jsx}"],
testURL: "http://localhost",
watchPlugins: [
require.resolve("jest-watch-typeahead/filename"),
require.resolve("jest-watch-typeahead/testname"),
],
coverageReporters: ["json", "lcov", "text", "clover"],
// collectCoverage: !!`Boolean(process.env.CI)`,
collectCoverageFrom: ["src/**/*.{ts,tsx,js,jsx}"],
coveragePathIgnorePatterns: ["/templates/"],
// coverageThreshold: {
// global: {
// branches: 100,
// functions: 100,
// lines: 100,
// statements: 100,
// },
// },
globals: {
"ts-jest": {
tsconfig: __dirname + "/tsconfig.test.json",
isolatedModules: true,
},
},
}