-
-
Notifications
You must be signed in to change notification settings - Fork 645
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
javascript: Test goal with package manager installed test runner supp…
…ort (#18554) Add support for running package manager installed test runners, and `javascript_test` targets. There's multiple flavors of how coverage reports are configured (extra args, separate script) depending on test runner. To stay unopinionated I implemented support for both. If one has to go, extra args is the one. This PR includes: 1. Introduce a new `scripts` mapper build symbol `node_test_script`, where users can augment default behaviour, which is: 2. To run `(npm|pnpm|yarn) run test`, the "standard" way to execute test runners. 3. Coverage reports per test support. I made no effort to merge the coverage reports. 4. No batch support (yet). I think it would be good to OOTB assume that `npm run test <all-files-for-workspace>` is preferred to current behaviour of 1 run per file. See e.g https://jestjs.io/docs/cli#--maxworkersnumstring. Fixes #18524.
- Loading branch information
Showing
41 changed files
with
27,174 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/python/pants/backend/javascript/goals/jest_resources/BUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md). | ||
# Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
|
||
resources(sources=["package-lock.json"]) |
Oops, something went wrong.