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

test(create-gatsby): add test for handling errors in install plugins #28364

Merged
merged 3 commits into from
Dec 3, 2020

Conversation

mfrachet
Copy link
Contributor

@mfrachet mfrachet commented Nov 30, 2020

Description

Unit test to catch and lock error on the the install plugins step of the create-gatsby cli

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Nov 30, 2020
@@ -0,0 +1,4 @@
export const requireResolve = (
Copy link
Contributor Author

@mfrachet mfrachet Nov 30, 2020

Choose a reason for hiding this comment

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

ℹ️ Aims to mock require.resolve that is not yet shipped in jest: jestjs/jest#9543

@mfrachet mfrachet requested review from ascorbic and mxstbr November 30, 2020 10:04
@mfrachet mfrachet removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Nov 30, 2020
@mfrachet mfrachet force-pushed the mfrachet/testing-create-gatsby branch from ef876d4 to 62d0172 Compare December 1, 2020 13:29
@mfrachet mfrachet changed the title test(create-gatsby): add test for handling errors in install plugings test(create-gatsby): add test for handling errors in install plugins Dec 1, 2020
Copy link
Contributor

@gillkyle gillkyle left a comment

Choose a reason for hiding this comment

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

I think this looks good but I see one test that looks like maybe it's duplicated? Not sure what the exact case is there.

packages/create-gatsby/src/__tests__/install-plugins.ts Outdated Show resolved Hide resolved
@mfrachet mfrachet requested a review from gillkyle December 2, 2020 10:43
Copy link
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

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

Looking good!

@mfrachet mfrachet merged commit e7b329c into master Dec 3, 2020
@mfrachet mfrachet deleted the mfrachet/testing-create-gatsby branch December 3, 2020 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants