Skip to content

Commit

Permalink
test: fixes for non-latest node.js
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny committed Jun 11, 2016
1 parent 24b58eb commit e4aa629
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/inspect-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ tape('v8 inspect', (t) => {
t.ok(/\[4\]=[^\n]*undefined/.test(lines), '[4] undefined element');

const reMatch = lines.match(
/\[23\]=(0x[0-9a-f]+):<JSRegExp source=\/regexp\/>/);
/\[23\]=(0x[0-9a-f]+):<(?:Object: RegExp|JSRegExp source=\/regexp\/)>/);
t.ok(reMatch, '[23] RegExp element');
regexp = reMatch[1];

Expand All @@ -75,7 +75,9 @@ tape('v8 inspect', (t) => {

sess.linesUntil(/}>/, (lines) => {
lines = lines.join('\n');
t.ok(/source=\/regexp\//.test(lines), 'regexp.source');
t.ok(/source=\/regexp\//.test(lines) ||
/\.source=[^\n]*<String: "regexp">/.test(lines),
'regexp.source');
});

sess.linesUntil(/">/, (lines) => {
Expand Down

0 comments on commit e4aa629

Please sign in to comment.