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

tests: centralize running of recipe tests #13150

Merged
merged 1 commit into from
Sep 30, 2021
Merged

tests: centralize running of recipe tests #13150

merged 1 commit into from
Sep 30, 2021

Conversation

brendankenny
Copy link
Member

kind of a prerequisite to #13148, but useful on its own.

The recipes each need their own yarn install run (and it turns out integration-test didn't have its install run, it was just falling back to the root jest and (I believe) the yarn linked lighthouse).

As a result it doesn't really make sense to include docs/recipes/integration-test/example-lh-auth.test.js in the default jest tests, which ideally should work with just a git clone ... && yarn && yarn build-all && yarn test.

This PR breaks it out into its own separate jest call, and centralizes the running of the recipe tests to their own package.json.

@brendankenny brendankenny requested a review from a team as a code owner September 30, 2021 18:38
@brendankenny brendankenny requested review from connorjclark and removed request for a team September 30, 2021 18:38
@google-cla google-cla bot added the cla: yes label Sep 30, 2021
"install-all": "yarn --cwd auth/ && yarn --cwd integration-test/ && yarn --cwd custom-gatherer-puppeteer/",
"integration-test": "yarn --cwd integration-test/ jest --config-path=docs-jest.config.js",
"custom-gatherer-puppeteer-test": "yarn --cwd custom-gatherer-puppeteer/ test",
"test": "yarn install-all && yarn integration-test && yarn custom-gatherer-puppeteer-test"
Copy link
Member Author

@brendankenny brendankenny Sep 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a little weird to run install-all under test, but since the only reason you'd ever run install-all (as opposed to installing just the single recipe you're looking at) is to run the tests, it seems fine? 🤷

coveragePathIgnorePatterns: [
'/test/',
'/scripts/',
],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these lines haven't been used for a loooooooong time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants