-
Notifications
You must be signed in to change notification settings - Fork 338
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
Support develoment environment using Node.js 19 #2564
Comments
Looks like those failures are caused by changed error messages from diff --git a/tests/unit/test-cmd/test.build.js b/tests/unit/test-cmd/test.build.js
index 9a63278..97e1295 100644
--- a/tests/unit/test-cmd/test.build.js
+++ b/tests/unit/test-cmd/test.build.js
@@ -269,7 +269,7 @@ describe('build', () => {
assert.instanceOf(error, UsageError);
assert.match(
error.message,
- /Unexpected string in JSON at position 14/
+ /Expected ':' after property name in JSON at position 14/
);
assert.match(error.message, /^Error parsing messages\.json/);
assert.include(error.message, messageFileName);
diff --git a/tests/unit/test-util/test.manifest.js b/tests/unit/test-util/test.manifest.js
index 7e9e17a..5fc665e 100644
--- a/tests/unit/test-util/test.manifest.js
+++ b/tests/unit/test-util/test.manifest.js
@@ -70,7 +70,7 @@ describe('util/manifest', () => {
);
assert.include(
error.message,
- 'Unexpected token "," (0x2C) in JSON at position 51'
+ 'Expected double-quoted property name in JSON at position 51'
);
assert.include(error.message, manifestFile);
}) |
…ore robust See: mozilla/web-ext#2564 git-svn-id: file:///srv/repos/svn-community/svn@1354113 9fca08f4-af9d-4005-b8df-a31f2cc04f65
…ore robust See: mozilla/web-ext#2564 git-svn-id: file:///srv/repos/svn-community/svn@1354113 9fca08f4-af9d-4005-b8df-a31f2cc04f65
We could/should check the Node version in the test and choose the error message based on that (e.g by detecting the version with Another alternative is to accept either error message, regardless of node version, e.g. |
It sounds simpler. I can create a pull request if you wish. |
Either approach works, but the advantage of using Using a single regexp with So to summarize, patches are welcome, and either approach is fine :) |
Is this a feature request or a bug?
A feature request
What is the current behavior?
I was testing if web-ext works with the latest Node.js or not, and noticed some tests failed
What is the expected or desired behavior?
web-ext works fine on Node.js 19.x and all tests pass.
Version information (for bug reports)
Logs are from web-ext 7.3.1. The issue still persists with web-ext 7.4.0.
The text was updated successfully, but these errors were encountered: