From 86095c92b3837c56ceb163f298e80dfd89ff8a4e Mon Sep 17 00:00:00 2001 From: Anton Kastritskiy Date: Mon, 22 Jul 2024 07:33:22 -0700 Subject: [PATCH] do not run .js or .jsx tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Currently when you run `yarn run test` you will see the following output: ``` ~/fbsource/xplat/sonar/desktop ▲ yarn run test ./flipper-ui/src/chrome/__tests__/ yarn run v1.18.0 $ yarn build:tsc $ tsc -b tsc-root/tsconfig.json && tsx ./scripts/compute-package-checksum.tsx -d ./babel-transformer -o ./lib/checksum.txt $ cross-env TZ=Pacific/Pohnpei jest ./flipper-ui/src/chrome/__tests__/ jest-haste-map: duplicate manual mock found: Logger.d The following files share their name; please delete one of them: * /flipper-ui/lib/fb-stubs/__mocks__/Logger.d.ts * /flipper-ui/lib/fb/__mocks__/Logger.d.ts jest-haste-map: duplicate manual mock found: Logger The following files share their name; please delete one of them: * /flipper-ui/lib/fb-stubs/__mocks__/Logger.js * /flipper-ui/lib/fb/__mocks__/Logger.js jest-haste-map: duplicate manual mock found: uuid The following files share their name; please delete one of them: * /flipper-ui/lib/__mocks__/uuid.js * /flipper-ui/src/__mocks__/uuid.tsx jest-haste-map: duplicate manual mock found: Logger The following files share their name; please delete one of them: * /flipper-ui/lib/fb/__mocks__/Logger.js * /flipper-ui/src/fb-stubs/__mocks__/Logger.tsx jest-haste-map: duplicate manual mock found: Logger The following files share their name; please delete one of them: * /flipper-ui/src/fb-stubs/__mocks__/Logger.tsx * /flipper-ui/src/fb/__mocks__/Logger.tsx ``` With this change jest should ignore the transpiled javascript files Reviewed By: mweststrate Differential Revision: D60036766 fbshipit-source-id: 5a499fcaf1d19c4b152dcb00da25406a26b4404e --- desktop/jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/jest.config.js b/desktop/jest.config.js index 3926aa8616c..013250d6edd 100644 --- a/desktop/jest.config.js +++ b/desktop/jest.config.js @@ -29,7 +29,7 @@ module.exports = { 'html', ...(process.env.COVERAGE_TEXT === 'detailed' ? ['text'] : []), ], - testMatch: ['**/**.(node|spec).(js|jsx|ts|tsx)'], + testMatch: ['**/**.(node|spec).(ts|tsx)'], testEnvironment: 'jsdom', resolver: '/jest.resolver.js', };