diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d0dcfcf8..11f14608 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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.`, where `` is one of `js` `mjs` `jsx` `ts` `tsx`. + ## How to review a code change diff --git a/jest.config.js b/jest.config.js index 8eb2a6ac..27df1631 100644 --- a/jest.config.js +++ b/jest.config.js @@ -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: ["/src/**/*(*.)+(spec|test).{[jt]s?(x),mjs}"], };