test: fix transform

This commit is contained in:
EnixCoda 2022-11-07 23:14:31 +08:00
parent 3cedfa12cd
commit 374f61dd81
3 changed files with 5 additions and 3 deletions

View file

@ -0,0 +1,2 @@
// TS files cannot be transformed without this babel config
module.exports = require('../babel.config')

View file

@ -144,7 +144,7 @@ module.exports = {
testMatch: ['**/?(*.)+(spec|test).ts?(x)'],
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
testPathIgnorePatterns: ['/node_modules/', '.d.ts$', '<rootDir>/vscode-icons/'],
testPathIgnorePatterns: ['/node_modules/', '.d.ts$'],
// The regexp pattern or array of patterns that Jest uses to detect test files
// testRegex: [],
@ -158,7 +158,7 @@ module.exports = {
// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
// testURL: "http://localhost",
testTimeout: 20000,
testTimeout: 30 * 1000,
// Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
// timers: "real",

View file

@ -1,4 +1,4 @@
// `.babelrc` is not loaded by babel-loader for files under node_modules, but `babel.config/js` is
// `.babelrc` is not loaded by babel-loader for files under node_modules, but `babel.config.js` is
module.exports = {
env: {
test: {