-
Notifications
You must be signed in to change notification settings - Fork 0
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
Platform-specific grouping of tests for npm test
#41
Comments
Any sort of npm test load balancing will be affected by this too. So ideally nominal testing should be preferred, but due to the startup overhead of mac and windows, load balancing will be necessary for PK. It appears it is possible with a custom jest scheduler. |
@emmacasolin relevant for the NAT testing in PK. |
The most cross-platform way to do this is conditional But I wonder what happens if a test file doesn't have any tests at all (because the condition was no for all tests in that file). It would be preferable that jest does not consider this an error. |
When restarting on MatrixAI/Polykey#357, please investigate this @emmacasolin and spec out the tasks. |
Here it is @emmacasolin I thought I wrote an issue already. |
This was superseded by MatrixAI/Polykey#380, and it was in fact done using We are not using any sort of group runner atm. If we do need to in the future, prefer using directories instead. It's just more stable and involves less infrastructure. Any selection of directories should be done through a |
Specification
It would be ideal that upon running
npm test
ornpm run test
that it would execute all general tests, and then detect which platform we are on, and run platform-specific tests.This would require the ability to "tag" certain tests to only be performed for platform specific group. Tagging would allow us to set the
os.platform()
,os.arch()
and other arbitrary tags to be required.Seems like there are 3 general solutions:
jest-group-runner
- this relies on comment annotations, and it seems to be file-specifictest
functions - this requires creating some conditional utility functions, and this becomes specific a single test function, perhaps conditionaldescribe
can also be usedAdditional context
Tasks
The text was updated successfully, but these errors were encountered: