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

chore(gatsby): adds support for PnP in test-require-error #14209

Merged
merged 1 commit into from
May 22, 2019

Conversation

arcanis
Copy link
Contributor

@arcanis arcanis commented May 21, 2019

Description

The current implementation of test-require-error was simply checking the error message to figure out whether the exception thrown was caused by the file not existing. This didn't work under PnP since we throw semantic errors (the message is different depending on the reason why the require call failed).

Instead we should check for the QUALIFIED_PATH_RESOLUTION_FAILED code, which means that the dependency check was successful but the resolver was unable to find a file on the disk that would match the specified request.

Related Issues

Needed to test #14208 w/ PnP

@arcanis arcanis requested a review from a team as a code owner May 21, 2019 11:29
@DSchau DSchau added the status: awaiting reviewer response A pull request that is currently awaiting a reviewer's response label May 21, 2019
@DSchau
Copy link
Contributor

DSchau commented May 21, 2019

@arcanis not exactly sure why this would cause the e2e test to fail, but it seems legitimate. Re-running the tests just to verify no issues.

@arcanis
Copy link
Contributor Author

arcanis commented May 21, 2019

Everything is green but now it's #14208 that got a timeout - I guess it's an infra fail, right?

@DSchau DSchau changed the title Adds support for PnP in test-require-error chore(gatsby): adds support for PnP in test-require-error May 21, 2019
Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

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

looks good to me, thanks for the update!

@wardpeet wardpeet merged commit 817a6c1 into gatsbyjs:master May 22, 2019
@arcanis arcanis deleted the resolution-fail-pnp branch May 22, 2019 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: awaiting reviewer response A pull request that is currently awaiting a reviewer's response
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants