Skip to content

Commit

Permalink
feat: ignore playwright folder in jest config (#45)
Browse files Browse the repository at this point in the history
### Developer Checklist (Definition of Done)

**Issue**

- [ ] All acceptance criteria from the issue are met
- [ ] Tested in latest Chrome/Firefox

**UI/UX/Vis**

- [ ] Requires UI/UX/Vis review
  - [ ] Reviewer(s) are notified (_tag assignees_)
  - [ ] Review has occurred (_link to notes_)
  - [ ] Feedback is included in this PR
  - [ ] Reviewer(s) approve of concept and design

**Code**

- [ ] Branch is up-to-date with the branch to be merged with, i.e.,
develop
- [ ] Code is cleaned up and formatted
- [ ] Unit tests are written (frontend/backend if applicable)
- [ ] Integration tests are written (if applicable)

**PR**

- [ ] Descriptive title for this pull request is provided (will be used
for release notes later)
- [ ] Reviewer and assignees are defined
- [ ] Add type label (e.g., *bug*, *feature*) to this pull request
- [ ] Add release label (e.g., `release: minor`) to this PR following
[semver](https://semver.org/)
- [ ] The PR is connected to the corresponding issue (via `Closes #...`)
- [ ] [Summary of changes](#summary-of-changes) is written


### Summary of changes

- Playwright and Jest use the same pattern, such that Jest picks up
playwright tests. This PR adds the flags to ignore all playwright
folders.

### Screenshots


### Additional notes for the reviewer(s)

-  
Thanks for creating this pull request 🤗
  • Loading branch information
puehringer authored Nov 1, 2023
2 parents 32ec565 + e517bf5 commit e6f5d4b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions config/jest.config.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ const pluginsNotToTransform = [
'd3v3',
].join('|');

/**
* TODO check if we can process inline webpack loaders (e.g. as found in https://github.com/phovea/phovea_ui/blob/master/src/_bootstrap.ts)
* see also https://jestjs.io/docs/en/webpack#mocking-css-modules
*/
/** @type {import('jest').Config} */
module.exports = {
testEnvironment: 'jsdom',
transform: {
Expand All @@ -22,6 +19,8 @@ module.exports = {
'\\.xml$': 'jest-raw-loader',
},
testRegex: '(.*(test|spec))\\.(tsx?)$',
testPathIgnorePatterns: ['playwright'],
coveragePathIgnorePatterns: ['playwright'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
modulePaths: ['src'],
resolver: 'visyn_scripts/config/jest_export_maps_resolver.js',
Expand Down

0 comments on commit e6f5d4b

Please sign in to comment.