-
Notifications
You must be signed in to change notification settings - Fork 318
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
Update unit test yarn scripts and add grepping ability #4273
Conversation
@@ -27,7 +27,7 @@ | |||
"tcm": "tcm -p src/**/*.module.scss", | |||
"tcm:watch": "yarn run tcm --watch", | |||
"prepare": "yarn run build", | |||
"test": "cross-env jest --env=jsdom --runInBand --ci --reporters=default --reporters=jest-junit", | |||
"test": "cross-env jest $GREP --env=jsdom --runInBand --ci --reporters=default --reporters=jest-junit --passWithNoTests", |
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.
these pass with no tests needed to be added in order to support GREP because there will be no matches there.
@@ -27,7 +27,7 @@ | |||
"tcm": "tcm -p src/**/*.module.scss", | |||
"tcm:watch": "yarn run tcm --watch", | |||
"prepare": "yarn run build", | |||
"test": "cross-env CI=1 jest --env=jsdom --runInBand --passWithNoTests", | |||
"test": "cross-env CI=1 jest $GREP --env=jsdom --runInBand --passWithNoTests", |
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.
Why don't we use the same script here? Is it because this package has no test cases?
"test": "cross-env CI=1 jest $GREP --env=jsdom --runInBand --passWithNoTests", | |
"test": "cross-env jest $GREP --env=jsdom --runInBand --ci --reporters=default --reporters=jest-junit --passWithNoTests", |
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.
oh, yeah, i didn't bother putting in packages that didn't have tests. but i guess this one COUNT have tests. so that's a good point.
"check-env": "echo ", | ||
"testMain": "jest $GREP --env=jsdom --runInBand --ci --reporters=default --reporters=jest-junit", | ||
"testPackagesCI": "JEST_JUNIT_UNIQUE_OUTPUT_NAME=true JEST_JUNIT_OUTPUT_DIR=/tmp/junit/module/ JEST_JUNIT_OUTPUT_NAME=unit-test-module yarn run testPackages", | ||
"testPackages": "lerna run test --ignore=cbioportal-frontend --stream", |
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.
Hmm. We should probably rename buildModules
and publishModules
as well for consistency. In that case we will also need to update https://github.com/cBioPortal/cbioportal-publisher/blob/master/.github/workflows/cbioportal-frontend-publish.yml#L27-L28.
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.
LGTM! This PR now successfully catches the failing unit tests 🎉
We now have two different unit testing jobs and dev scripts needed to reflect that. README as well.