Commit 44d1a46a authored by Rich Trott's avatar Rich Trott
Browse files

test: make url-parse-invalid-input engine agnostic

test-url-parse-invalid-input checks the message of an error that is
generated by the JavaScript engine. Error messages that change in the
underlying JavaScript engine should not be breaking changes in Node.js
and therefore should not cause tests to fail. Remove the message check
and replace it with a check of the type of the Error object along with
the absence of a `code` property. (If a `code` property were present, it
would indicate that the error was coming from Node.js rather than the
JavaScript engine.)

This also makes this test usable without modification in the ChakraCore
fork of Node.js.

PR-URL: https://github.com/nodejs/node/pull/21132


Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarTrivikram Kamat <trivikr.dev@gmail.com>
parent 6dbd6f6c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment