Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! worker: use DataCloneError for unknown native objects
  • Loading branch information
addaleax committed Jun 2, 2019
commit 07a77f63b1f3a99063eb9e013538071cf2d92c06
10 changes: 8 additions & 2 deletions test/parallel/test-worker-message-port-transfer-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ const { internalBinding } = require('internal/test/binding');

assert.throws(() => {
port1.postMessage(function foo() {});
}, /^DataCloneError: function foo\(\) \{\} could not be cloned\.$/);
}, {
name: 'DataCloneError',
message: /function foo\(\) \{\} could not be cloned\.$/
});
port1.close();
}

Expand All @@ -26,6 +29,9 @@ const { internalBinding } = require('internal/test/binding');

assert.throws(() => {
port1.postMessage(nativeObject);
}, /^DataCloneError: Cannot transfer object of unsupported type\.$/);
}, {
name: 'DataCloneError',
message: /Cannot transfer object of unsupported type\.$/
});
port1.close();
}