Skip to content

Commit

Permalink
Accommodate recent change to JSC's print utility (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
jugglinmike authored Oct 1, 2021
1 parent 913d4da commit 0b46c6e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/engines/javascriptcore.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,12 @@ class JavaScriptCoreInstaller extends Installer {

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

assert.strictEqual(
(await execa(this.binPath, ['-e', program])).stdout,
output,
assert(
pattern.test(output),
`Expected string "${output}" to match pattern ${pattern}`,
);
}
}
Expand Down

0 comments on commit 0b46c6e

Please sign in to comment.