Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restrict jest test match glob #87

Merged
merged 5 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ This document builds on the [default contributing.md](https://github.com/comcode

## How to make changes to code

### Creating tests

Test files must be within `/src`, with a file name ending in `.test.<ext>`, where `<ext>` is one of `js` `mjs` `jsx` `ts` `tsx`.

## How to review a code change
6 changes: 2 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
module.exports = {
preset: "ts-jest/presets/js-with-ts-esm",
testEnvironment: "node",
testMatch: [
"**/__tests__/**/*.{[jt]s?(x),mjs}",
"**/*(*.)+(spec|test).{[jt]s?(x),mjs}",
],
// tests must be within /src, with .spec or .test before file extension
testMatch: ["<rootDir>/src/**/*(*.)+(spec|test).{[jt]s?(x),mjs}"],
};