Skip to content

Commit

Permalink
build: Require test file names to include (spec|test)
Browse files Browse the repository at this point in the history
The default Jest config was considering my test fixture code as a
test suite because it was located under the `__tests__` directory.

Now, test files must end with `.test.ts` (or any of its common
variants. As a result, fixture code, which ends with `.ts` is no
longer considered a test suite.
  • Loading branch information
thehale committed Jun 23, 2024
1 parent 9bb0294 commit 6f6fed3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
preset: 'react-native',
};
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
};

0 comments on commit 6f6fed3

Please sign in to comment.