Skip to content

Commit 0b46c6e

Browse files
authored
Accommodate recent change to JSC's print utility (#27)
1 parent 913d4da commit 0b46c6e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/engines/javascriptcore.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,12 @@ class JavaScriptCoreInstaller extends Installer {
114114

115115
async test() {
116116
const program = 'print("42");';
117-
const output = '42';
117+
const output = (await execa(this.binPath, ['-e', program])).stdout;
118+
const pattern = /^("?)42\1$/;
118119

119-
assert.strictEqual(
120-
(await execa(this.binPath, ['-e', program])).stdout,
121-
output,
120+
assert(
121+
pattern.test(output),
122+
`Expected string "${output}" to match pattern ${pattern}`,
122123
);
123124
}
124125
}

0 commit comments

Comments
 (0)