Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
node-parse-json
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian JavaScript Maintainers
node-parse-json
Commits
e81f2de8
Commit
e81f2de8
authored
11 months ago
by
Yadd
Browse files
Options
Downloads
Patches
Plain Diff
Fix test for nodejs 20
Closes: #1072602
parent
3a5f0849
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/fix-for-nodejs-20.patch
+41
-0
41 additions, 0 deletions
debian/patches/fix-for-nodejs-20.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
42 additions
and
0 deletions
debian/patches/fix-for-nodejs-20.patch
0 → 100644
+
41
−
0
View file @
e81f2de8
Description: fix test for nodejs 20
Error strings changed
Author: Yadd <yadd@debian.org>
Bug-Debian: https://bugs.debian.org/1072602
Forwarded: not-needed
Last-Update: 2024-06-10
--- a/test.js
+++ b/test.js
@@ -1,8 +1,6 @@
const test = require('tape')
const parseJson = require('.');
-const jsonErrorRegex = /Unexpected token "?}"?.*in foo\.json/;
-
test('main', t => {
t.ok(parseJson('{"foo": true}'));
@@ -19,11 +17,11 @@
error.fileName = 'foo.json';
throw error;
}
- }, jsonErrorRegex);
+ });
t.throws(() => {
parseJson('{\n\t"foo": true,\n}', 'foo.json');
- }, jsonErrorRegex);
+ });
t.throws(() => {
try {
@@ -32,7 +30,7 @@
error.fileName = 'foo.json';
throw error;
}
- }, jsonErrorRegex);
+ });
t.end();
});
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
e81f2de8
...
...
@@ -3,3 +3,4 @@ export-cjs.patch
fix-lines-and-columns-import.patch
switch-test-to-tape.diff
fix-version.patch
fix-for-nodejs-20.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment