-
-
Notifications
You must be signed in to change notification settings - Fork 941
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
chore: convenient script to filter tests #6787
Conversation
/* eslint-disable @typescript-eslint/restrict-template-expressions */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember making this change.
Could you describe in |
pkg-manager/core/package.json
Outdated
@@ -144,9 +144,11 @@ | |||
"registry-mock": "registry-mock", | |||
"test:jest": "jest", | |||
"test:e2e": "registry-mock prepare && run-p -r registry-mock test:jest", | |||
"filtered-test:jest": "sh -o nounset -c 'jest --verbose --testPathPattern \"$TEST_PATH_PATTERN\" --testNamePattern \"$TEST_NAME_PATTERN\"'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would this work? The registry-mock is not started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that why successful offline installation
test didn't finish!
Anyway, with the latest commits, I have merged filtered-test
into test
. The environment variables have been made optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, since I merge filterered-test
into test
, test
now requires sh
even on Windows. Do you prefer creating a JavaScript file to spawn the test cross-platform?
I have found the right way to do this, using jest's setup and teardown scripts: #6813 |
so that we don't need to edit the source code (adding
.only
to the test file and file path to the script) and the undo it over and over again.