From 374f61dd8119eddb9956fcae025b1f1a612d06b1 Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Mon, 7 Nov 2022 23:14:31 +0800 Subject: [PATCH] test: fix transform --- __tests__/babel.config.js | 2 ++ __tests__/jest.config.js | 4 ++-- babel.config.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 __tests__/babel.config.js diff --git a/__tests__/babel.config.js b/__tests__/babel.config.js new file mode 100644 index 0000000..8e0046f --- /dev/null +++ b/__tests__/babel.config.js @@ -0,0 +1,2 @@ +// TS files cannot be transformed without this babel config +module.exports = require('../babel.config') diff --git a/__tests__/jest.config.js b/__tests__/jest.config.js index d9cf6da..c31f45d 100644 --- a/__tests__/jest.config.js +++ b/__tests__/jest.config.js @@ -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$', '/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", diff --git a/babel.config.js b/babel.config.js index a1ecd25..5b020ac 100644 --- a/babel.config.js +++ b/babel.config.js @@ -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: {