GeezerVison is showing github.com — test: fix some tests when path contains `%` · nodejs/node@7c88739
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: test/common/inspector-helper.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -255,8 +255,8 @@ class InspectorSession { | 255 | 255 | const callFrame = message.params.callFrames[0]; | 256 | 256 | const location = callFrame.location; | 257 | 257 | const scriptPath = this._scriptsIdsByUrl.get(location.scriptId); | 258 | | - assert.strictEqual(scriptPath.toString(), | 259 | | - expectedScriptPath.toString(), | | 258 | + assert.strictEqual(decodeURIComponent(scriptPath), | | 259 | + decodeURIComponent(expectedScriptPath), | 260 | 260 | `${scriptPath} !== ${expectedScriptPath}`); | 261 | 261 | assert.strictEqual(location.lineNumber, line); | 262 | 262 | return true; | |
Collapse file Copy file name to clipboardExpand all lines: test/es-module/test-esm-import-meta-resolve.mjs +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -45,7 +45,7 @@ assert.deepStrictEqual( | 45 | 45 | { default: 'some://weird/protocol' }, | 46 | 46 | ); | 47 | 47 | assert.deepStrictEqual( | 48 | | - { ...await import(`data:text/javascript,export default import.meta.resolve("baz/", ${JSON.stringify(fixtures)})`) }, | | 48 | + { ...await import(`data:text/javascript,export default import.meta.resolve("baz/", ${encodeURIComponent(JSON.stringify(fixtures))})`) }, | 49 | 49 | { default: fixtures + 'node_modules/baz/' }, | 50 | 50 | ); | 51 | 51 | assert.deepStrictEqual( | |
Collapse file Copy file name to clipboardExpand all lines: test/es-module/test-esm-loader-hooks.mjs +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -787,7 +787,7 @@ describe('Loader hooks', { concurrency: true }, () => { | 787 | 787 | const { code, signal, stdout, stderr } = await spawnPromisified(execPath, [ | 788 | 788 | '--no-warnings', | 789 | 789 | '--experimental-loader', | 790 | | - `data:text/javascript,const fixtures=${JSON.stringify(fixtures.path('empty.js'))};export ${ | | 790 | + `data:text/javascript,const fixtures=${encodeURI(JSON.stringify(fixtures.path('empty.js')))};export ${ | 791 | 791 | encodeURIComponent(function resolve(s, c, n) { | 792 | 792 | if (s.endsWith('entry-point')) { | 793 | 793 | return { | |
|