Skip to content
Prev Previous commit
Next Next commit
ci: fixing js tests
  • Loading branch information
erunion committed Sep 13, 2023
commit 89e7cf89182f5be47b0abb69f945581076fa3338
4 changes: 1 addition & 3 deletions src/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,10 @@ function integrationTest(
try {
response = JSON.parse(stdout);
} catch (err) {
console.log({ fixtureExtension, stdout });

// Some JS targets print out their response with `console.log(json)` which creates
// a JSON object that we can't access with `JSON.parse()`.
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_eval!
if (['.js', '.cjs'].includes(fixtureExtension)) {
if (!['.js', '.cjs'].includes(fixtureExtension)) {
throw err;
}

Expand Down