Skip to content
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

Merged
merged 3 commits into from
May 27, 2022

Conversation

alisman
Copy link
Collaborator

@alisman alisman commented May 26, 2022

We now have two different unit testing jobs and dev scripts needed to reflect that. README as well.

@alisman alisman changed the title Unit updates Update unit test yarn scripts and add grepping ability May 26, 2022
@alisman alisman added the test label May 26, 2022
@alisman alisman requested a review from onursumer May 26, 2022 15:35
@@ -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",
Copy link
Collaborator Author

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",
Copy link
Member

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?

Suggested change
"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",

Copy link
Collaborator Author

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",
Copy link
Member

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.

Copy link
Member

@onursumer onursumer left a 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 🎉

@alisman alisman merged commit 4de0f07 into cBioPortal:master May 27, 2022
@alisman alisman deleted the unitUpdates branch May 27, 2022 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants