-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Based on #588, I am opening discussion about organization and improvements of test runners.
After #588 is merged, we will be in situation when we have npm test
command that just runs npm run test:jest
, but not npm run test:playwright:all
. You need to run npm run test:playwright:all
separately in Playwright Docker container to have uniform testing environment to generate correct snapshots.
What more, if running tests on Apple Silicon, you always need to run npm ci
within Docker (in Node shell or Playwright, it does not matter) to ensure compilation of rollup/vite for correct architecture.
My suggestions:
- I would merge Node shell and Playwright and you only one Node container with preinstalled browsers.
- I would require running the project in the Docker. It means that
(optional)
statements would disappear from the documentation. - I would allow to run
npm run test:playwright:all
withnpm test
- I would add pre-scripts to
npm ci
,npm test
(and all Playwright related scripts) to ensure that it is run inside Docker only, otherwise it fail with error.
This would result in uniform environment, uniform approach that would be controlled (and would failed if running on host machine), less requimenets for disk space and more straightforward organization of npm scripts.
I would also suggest prefixing all linters with lint:
, so that all linters are grouped, all test runners are grouped.