fix testMatch /ignore

This commit is contained in:
Boegie19 2023-04-26 13:00:22 +02:00
parent 7f1bb7e73f
commit 266627f5c0
2 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@ const moduleNameMapper = {
module.exports = {
rootDir: __dirname,
moduleNameMapper,
testPathIgnorePatterns: ['/node_modules/', '__tests__'],
testPathIgnorePatterns: ['node_modules/', '__tests__'],
globalSetup: path.join(__dirname, 'test/config/front/global-setup.js'),
setupFiles: [
path.join(__dirname, 'packages/admin-test-utils/lib/setup/test-bundler.js'),
@ -45,9 +45,9 @@ module.exports = {
path.join(__dirname, 'packages/admin-test-utils/lib/mocks/mockRangeApi.js'),
],
setupFilesAfterEnv: [
path.join(__dirname, '/packages/admin-test-utils/lib/setup/styled-components.js'),
path.join(__dirname, '/packages/admin-test-utils/lib/setup/strapi.js'),
path.join(__dirname, '/packages/admin-test-utils/lib/setup/prop-types.js'),
path.join(__dirname, 'packages/admin-test-utils/lib/setup/styled-components.js'),
path.join(__dirname, 'packages/admin-test-utils/lib/setup/strapi.js'),
path.join(__dirname, 'packages/admin-test-utils/lib/setup/prop-types.js'),
],
testEnvironment: 'jsdom',
transform: {
@ -75,7 +75,7 @@ module.exports = {
transformIgnorePatterns: [
'node_modules/(?!(react-dnd|dnd-core|react-dnd-html5-backend|@strapi/design-system|@strapi/icons|fractional-indexing)/)',
],
testMatch: ['/**/tests/**/?(*.)+(spec|test).[jt]s?(x)'],
testMatch: ['**/tests/**/?(*.)+(spec|test).[jt]s?(x)'],
testEnvironmentOptions: {
url: 'http://localhost:1337/admin',
},

View File

@ -4,7 +4,7 @@ module.exports = {
setupFilesAfterEnv: [__dirname + '/test/unit.setup.js'],
modulePathIgnorePatterns: ['.cache', 'dist'],
testPathIgnorePatterns: ['.testdata.js', '.test.utils.js'],
testMatch: ['/**/__tests__/**/*.[jt]s?(x)'],
testMatch: ['**/__tests__/**/*.[jt]s?(x)'],
// Use `jest-watch-typeahead` version 0.6.5. Newest version 1.0.0 does not support jest@26
// Reference: https://github.com/jest-community/jest-watch-typeahead/releases/tag/v1.0.0
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],