Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3273707

Browse filesBrowse files
richardlauaduh95
authored andcommitted
test: fix tests when Amaro is unavailable
Fix two tests that fail when `node` is configured `--without-amaro`. PR-URL: #55320 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 34ca36a commit 3273707
Copy full SHA for 3273707

File tree

Expand file treeCollapse file tree

2 files changed

+17
-12
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+17
-12
lines changed
Open diff view settings
Collapse file

‎test/es-module/test-esm-loader-entry-url.mjs‎

Copy file name to clipboardExpand all lines: test/es-module/test-esm-loader-entry-url.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ describe('--entry-url', { concurrency: true }, () => {
7676
);
7777
});
7878

79-
it('should support loading TypeScript URLs', async () => {
79+
it('should support loading TypeScript URLs', { skip: !process.config.variables.node_use_amaro }, async () => {
8080
const typescriptUrls = [
8181
'typescript/cts/test-require-ts-file.cts',
8282
'typescript/mts/test-import-ts-file.mts',
Collapse file

‎test/parallel/test-runner-cli.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-runner-cli.js
+16-11Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,22 @@ for (const isolation of ['none', 'process']) {
6767
`--experimental-${type}-types`, `--experimental-test-isolation=${isolation}`];
6868
const child = spawnSync(process.execPath, args, { cwd: join(testFixtures, 'matching-patterns') });
6969

70-
assert.strictEqual(child.stderr.toString(), '');
71-
const stdout = child.stdout.toString();
72-
73-
assert.match(stdout, /ok 1 - this should pass/);
74-
assert.match(stdout, /ok 2 - this should pass/);
75-
assert.match(stdout, /ok 3 - this should pass/);
76-
assert.match(stdout, /ok 4 - this should pass/);
77-
assert.match(stdout, /ok 5 - this should pass/);
78-
assert.match(stdout, /ok 6 - this should pass/);
79-
assert.strictEqual(child.status, 0);
80-
assert.strictEqual(child.signal, null);
70+
if (!process.config.variables.node_use_amaro) {
71+
// e.g. Compiled with `--without-amaro`.
72+
assert.strictEqual(child.status, 1);
73+
} else {
74+
assert.strictEqual(child.stderr.toString(), '');
75+
const stdout = child.stdout.toString();
76+
77+
assert.match(stdout, /ok 1 - this should pass/);
78+
assert.match(stdout, /ok 2 - this should pass/);
79+
assert.match(stdout, /ok 3 - this should pass/);
80+
assert.match(stdout, /ok 4 - this should pass/);
81+
assert.match(stdout, /ok 5 - this should pass/);
82+
assert.match(stdout, /ok 6 - this should pass/);
83+
assert.strictEqual(child.status, 0);
84+
assert.strictEqual(child.signal, null);
85+
}
8186
}
8287

8388
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.