diff --git a/jest.config.js b/jest.config.js index 670eff3..fe3245a 100644 --- a/jest.config.js +++ b/jest.config.js @@ -22,6 +22,7 @@ module.exports = { // Root directory for tests rootDir: '.', + roots: [ '', '/tests/js' ], // Test setup files run after Jest environment is set up setupFilesAfterEnv: [ diff --git a/__mocks__/@wordpress/api-fetch.ts b/tests/js/__mocks__/@wordpress/api-fetch.ts similarity index 100% rename from __mocks__/@wordpress/api-fetch.ts rename to tests/js/__mocks__/@wordpress/api-fetch.ts diff --git a/tests/js/tsconfig.json b/tests/js/tsconfig.json index 2f3e5a5..858cf6f 100644 --- a/tests/js/tsconfig.json +++ b/tests/js/tsconfig.json @@ -7,8 +7,8 @@ "types": [ "jest", "node", "@testing-library/jest-dom" ] }, "include": [ - "./*.ts", - "./*.tsx", + "./**/*.ts", + "./**/*.tsx", "../../assets/src/**/*.ts", "../../assets/src/**/*.tsx" ],