Skip to content

Commit

Permalink
do not run .js or .jsx tests
Browse files Browse the repository at this point in the history
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:
    * <rootDir>/flipper-ui/lib/fb-stubs/__mocks__/Logger.d.ts
    * <rootDir>/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:
    * <rootDir>/flipper-ui/lib/fb-stubs/__mocks__/Logger.js
    * <rootDir>/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:
    * <rootDir>/flipper-ui/lib/__mocks__/uuid.js
    * <rootDir>/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:
    * <rootDir>/flipper-ui/lib/fb/__mocks__/Logger.js
    * <rootDir>/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:
    * <rootDir>/flipper-ui/src/fb-stubs/__mocks__/Logger.tsx
    * <rootDir>/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
  • Loading branch information
antonk52 authored and facebook-github-bot committed Jul 22, 2024
1 parent 88802b3 commit 86095c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion desktop/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '<rootDir>/jest.resolver.js',
};

0 comments on commit 86095c9

Please sign in to comment.