Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
test: add engine-specific message for new test
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhorton authored and kfarnung committed Jan 9, 2018
1 parent 5035d96 commit 574b4df
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/parallel/test-stream-base-prototype-accessors.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

require('../common');
const common = require('../common');

// This tests that the prototype accessors added by StreamBase::AddMethods
// do not raise assersions when called with incompatible receivers.
Expand All @@ -12,7 +12,10 @@ const TTY = process.binding('tty_wrap').TTY;

// Should throw instead of raise assertions
{
const msg = /TypeError: Method \w+ called on incompatible receiver/;
const msg = common.engineSpecificMessage({
v8: /TypeError: Method \w+ called on incompatible receiver/,
chakracore: /TypeError: Illegal invocation/
});
assert.throws(() => {
TTY.prototype.bytesRead;
}, msg);
Expand Down

0 comments on commit 574b4df

Please sign in to comment.