mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-02-20 00:33:07 +01:00
chore(tests): cleanup jets configs (#9869)
This commit is contained in:
@@ -14,6 +14,7 @@ module.exports = {
|
||||
collectCoverage: false,
|
||||
moduleDirectories: ['node_modules', './'], // './' - ia a home directory for the 'trezor-blockchain-link' library (lib/index.js)
|
||||
modulePathIgnorePatterns: ['<rootDir>/libDev'],
|
||||
watchPathIgnorePatterns: ['<rootDir>/libDev'],
|
||||
transform: {
|
||||
'^.+\\.js$': 'babel-jest',
|
||||
'^.+\\.ts$': 'ts-jest',
|
||||
|
||||
@@ -29,4 +29,5 @@ module.exports = {
|
||||
'^.+\\.js$': 'babel-jest',
|
||||
'^.+\\.ts$': 'ts-jest',
|
||||
},
|
||||
watchPathIgnorePatterns: ['<rootDir>/libDev'],
|
||||
};
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const baseConfig = require('../../jest.config.base');
|
||||
|
||||
module.exports = {
|
||||
preset: '../../jest.config.base.js',
|
||||
...baseConfig,
|
||||
testEnvironment: 'node',
|
||||
};
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const baseConfig = require('../../jest.config.base');
|
||||
|
||||
module.exports = {
|
||||
preset: '../../jest.config.base.js',
|
||||
...baseConfig,
|
||||
testEnvironment: 'jsdom',
|
||||
};
|
||||
|
||||
@@ -10,6 +10,8 @@ module.exports = {
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: ['**/src/**/*.ts'],
|
||||
modulePathIgnorePatterns: ['node_modules', '<rootDir>/lib', '<rootDir>/libDev'],
|
||||
watchPathIgnorePatterns: ['<rootDir>/libDev'],
|
||||
testPathIgnorePatterns: ['<rootDir>/libDev'],
|
||||
transform: {
|
||||
'^.+\\.ts$': 'ts-jest',
|
||||
},
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
const baseConfig = require('../../jest.config.base');
|
||||
|
||||
module.exports = {
|
||||
preset: '../../jest.config.base.js',
|
||||
...baseConfig,
|
||||
moduleNameMapper: {
|
||||
axios: 'axios/dist/node/axios.cjs',
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const { testPathIgnorePatterns } = require('../../jest.config.base');
|
||||
const { testPathIgnorePatterns, ...baseConfig } = require('../../jest.config.base');
|
||||
|
||||
module.exports = {
|
||||
preset: '../../jest.config.base.js',
|
||||
...baseConfig,
|
||||
collectCoverage: true,
|
||||
testPathIgnorePatterns: [...testPathIgnorePatterns, 'e2e'],
|
||||
};
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
const { testPathIgnorePatterns, ...baseConfig } = require('../../jest.config.base');
|
||||
|
||||
module.exports = {
|
||||
preset: '../../jest.config.base.js',
|
||||
...baseConfig,
|
||||
testMatch: ['**/tests/*.test.ts'],
|
||||
testPathIgnorePatterns: ['e2e'],
|
||||
testPathIgnorePatterns: [...testPathIgnorePatterns, 'e2e'],
|
||||
};
|
||||
|
||||
@@ -20,4 +20,6 @@ export default {
|
||||
bail: true,
|
||||
testEnvironment: 'node',
|
||||
globals: {},
|
||||
watchPathIgnorePatterns: ['<rootDir>/libDev'],
|
||||
testPathIgnorePatterns: ['<rootDir>/libDev'],
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const { testPathIgnorePatterns } = require('../../jest.config.base');
|
||||
const { testPathIgnorePatterns, ...baseConfig } = require('../../jest.config.base');
|
||||
|
||||
module.exports = {
|
||||
preset: '../../jest.config.base.js',
|
||||
...baseConfig,
|
||||
testEnvironment: 'node',
|
||||
collectCoverage: true,
|
||||
setupFiles: ['<rootDir>/setupJest.ts'],
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
preset: '../../jest.config.base.js',
|
||||
};
|
||||
@@ -7,7 +7,7 @@
|
||||
"main": "src/index",
|
||||
"scripts": {
|
||||
"lint:js": "yarn g:eslint '**/*.{ts,tsx,js}'",
|
||||
"test:unit": "jest --passWithNoTests",
|
||||
"test:unit": "jest -c ../../jest.config.base.js --passWithNoTests",
|
||||
"type-check": "tsc --build"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -11,6 +11,8 @@ module.exports = {
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: ['**/src/**/*.ts', '!**/__tests__/**'],
|
||||
modulePathIgnorePatterns: ['node_modules', '<rootDir>/lib', '<rootDir>/libDev'],
|
||||
watchPathIgnorePatterns: ['<rootDir>/libDev', '<rootDir>/lib'],
|
||||
testPathIgnorePatterns: ['<rootDir>/libDev/', '<rootDir>/lib/'],
|
||||
transform: {
|
||||
'^.+\\.ts$': 'ts-jest',
|
||||
},
|
||||
|
||||
@@ -13,6 +13,8 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
modulePathIgnorePatterns: ['node_modules', '<rootDir>/lib', '<rootDir>/libDev'],
|
||||
watchPathIgnorePatterns: ['<rootDir>/libDev', '<rootDir>/lib'],
|
||||
testPathIgnorePatterns: ['<rootDir>/libDev/', '<rootDir>/lib/'],
|
||||
transformIgnorePatterns: ['/node_modules/'],
|
||||
testMatch: ['**/*.test.(ts|tsx|js)'],
|
||||
transform: {
|
||||
|
||||
@@ -49,7 +49,19 @@ module.exports = {
|
||||
functions: 47,
|
||||
},
|
||||
},
|
||||
modulePathIgnorePatterns: ['node_modules', '<rootDir>/libDev'],
|
||||
modulePathIgnorePatterns: ['node_modules'],
|
||||
watchPathIgnorePatterns: ['<rootDir>/libDev'],
|
||||
testPathIgnorePatterns: [
|
||||
'/node_modules/',
|
||||
'/libDev/',
|
||||
'/lib/',
|
||||
'/dist/',
|
||||
'/build/',
|
||||
'/build-electron/',
|
||||
'/coverage/',
|
||||
'/public/',
|
||||
],
|
||||
|
||||
transformIgnorePatterns: ['/node_modules/(?!d3-(.*)|internmap)/'],
|
||||
testMatch: ['**/*.test.(ts|tsx|js)'],
|
||||
transform: {
|
||||
|
||||
@@ -2,6 +2,8 @@ export default {
|
||||
rootDir: './',
|
||||
moduleFileExtensions: ['ts', 'js'],
|
||||
modulePathIgnorePatterns: ['node_modules'],
|
||||
watchPathIgnorePatterns: ['<rootDir>/libDev', '<rootDir>/lib'],
|
||||
testPathIgnorePatterns: ['<rootDir>/libDev/', '<rootDir>/lib/'],
|
||||
transform: {
|
||||
'\\.(js|ts)$': [
|
||||
'babel-jest',
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
const { testPathIgnorePatterns, ...baseConfig } = require('../../jest.config.base');
|
||||
|
||||
module.exports = {
|
||||
preset: '../../jest.config.base.js',
|
||||
...baseConfig,
|
||||
testEnvironment: 'node',
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: ['src/**/*.ts'],
|
||||
testPathIgnorePatterns: ['libDev', 'e2e'],
|
||||
testPathIgnorePatterns: [...testPathIgnorePatterns, 'e2e'],
|
||||
watchPathIgnorePatterns: ['<rootDir>/libDev', '<rootDir>/lib'],
|
||||
};
|
||||
|
||||
@@ -10,6 +10,8 @@ module.exports = {
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: ['**/src/**/*.ts'],
|
||||
modulePathIgnorePatterns: ['node_modules', '<rootDir>/lib', '<rootDir>/libDev'],
|
||||
watchPathIgnorePatterns: ['<rootDir>/libDev', '<rootDir>/lib'],
|
||||
testPathIgnorePatterns: ['<rootDir>/libDev/', '<rootDir>/lib/'],
|
||||
setupFiles: ['./tests/jest.setup.js'],
|
||||
transform: {
|
||||
'^.+\\.ts$': 'ts-jest',
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
preset: '../../jest.config.base.js',
|
||||
};
|
||||
@@ -8,8 +8,8 @@
|
||||
"scripts": {
|
||||
"lint:js": "yarn g:eslint '**/*.{ts,tsx,js}'",
|
||||
"type-check": "tsc --build tsconfig.json",
|
||||
"test:unit": "jest",
|
||||
"test-unit:watch": "jest -o --watch"
|
||||
"test:unit": "jest -c ../../jest.config.base.js",
|
||||
"test-unit:watch": "jest -c ../../jest.config.base.js -o --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@reduxjs/toolkit": "1.9.5",
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
preset: '../../jest.config.base.js',
|
||||
};
|
||||
@@ -8,8 +8,8 @@
|
||||
"scripts": {
|
||||
"lint:js": "yarn g:eslint '**/*.{ts,tsx,js}'",
|
||||
"type-check": "tsc --build",
|
||||
"test:unit": "jest",
|
||||
"test-unit:watch": "jest -o --watch"
|
||||
"test:unit": "jest -c ../../jest.config.base.js",
|
||||
"test-unit:watch": "jest -c ../../jest.config.base.js -o --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@suite-common/suite-config": "workspace:*",
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
preset: '../../jest.config.base.js',
|
||||
};
|
||||
@@ -8,8 +8,8 @@
|
||||
"scripts": {
|
||||
"lint:js": "yarn g:eslint '**/*.{ts,tsx,js}'",
|
||||
"type-check": "tsc --build",
|
||||
"test:unit": "jest",
|
||||
"test-unit:watch": "jest -o --watch"
|
||||
"test:unit": "jest -c ../../jest.config.base.js",
|
||||
"test-unit:watch": "jest -c ../../jest.config.base.js -o --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ethereumjs/common": "^4.1.0",
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
preset: '../../jest.config.base.js',
|
||||
};
|
||||
Reference in New Issue
Block a user