Separating unit test from accessibility tests

Viewed 30

I'm building a React Application using create-react-app and the CI/CD process fails randomly while running accessibility tests. I would like to seperate the test into unit test and accessibility tests so I can run them at different times with set different parameters. I've tried a number of variations using testMatch etc but nothing seems to work. Any suggestions?

Unit Test .test.tsx

Accessibility test .a11y.test.tsx

Path: package.js

{
  "name": "MyAPP",
  "scripts": {
    "test": "react-scripts test .test.tsx !.a11y.test.tsx",
    "test:a11y": "react-scripts test .a11y.test.tsx !.test.tsx"
  },
  "jest": {
  }
}
0 Answers
Related