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

Fix test failing on new node versions #306

Merged
merged 2 commits into from
Jan 15, 2024

Conversation

voxpelli
Copy link
Contributor

There has been a subtle change in the error message for the Unexpected token JSON parsing error.

Easiest fix is this one here that changes the test to simply test for the inclusion of the phrase Unexpected token rather than the exact wording of the error.

Found when I tried to help debug #305

Copy link
Contributor

@kanongil kanongil 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. For more future-proofing, you might even do:

expect(err).to.be.an.error(SyntaxError, /JSON/);

test/index.js Show resolved Hide resolved
@Marsup
Copy link
Contributor

Marsup commented Jan 15, 2024

It seems to be a boom error though. I've made a suggestion and will try moving on if it passes. Tests seem to fail locally on options.baseUrl uses path when path is a full URL for me, no matter the version.

@Marsup Marsup self-assigned this Jan 15, 2024
@Marsup Marsup added the test Test or coverage label Jan 15, 2024
@Marsup
Copy link
Contributor

Marsup commented Jan 15, 2024

Windows tests seem quite flaky, although node 20 might be legit, I'll merge it nonetheless.

@Marsup Marsup merged commit 1bffa31 into hapijs:master Jan 15, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Test or coverage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants