Feature Request: specify os
in options.json
#10252
Labels
area: tests
i: enhancement
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
Feature Request
Is your feature request related to a problem? Please describe.
yarn jest
is failing on Windows. All the failures are related to the path separator. For exampleWhen we are injecting a file path to the source code, the behavior will be os-dependent. It would be convenient if we can specify
os
in options.json so that text-runner will run different subset of test cases. The idea comes from #10242 (comment)Describe the solution you'd like
Specify an
os
field inoptions.json
,If
os
is not specified, it means the test case should be run on every platform we supported.Example: a test cases specifies
will only run on Linux and macOS machines.
OS Detection
Map
process.platform
to normalized name when necessary:Describe alternatives you've considered
Since all of cross-platform test failure comes from path separator, we may also instead define
os
be of a simplified subset ofprocess.platform
where "posix" = "macos" | "linux" | "freebsd" | "openbsd" | "sunos" | "aix".
Personally I prefer the second approach and we could easily extend our
os
definitions when we come across other os-dependent issues.Teachability, Documentation, Adoption, Migration Strategy
This option is for internal use only. It should have no impact on our users.
Previous art
minNodeVersion: #5765.
Related
This feature will work with #10249 to enable windows building on travis.
The text was updated successfully, but these errors were encountered: