mirror of
https://github.com/nodejs/node.git
synced 2025-04-30 23:56:58 +00:00

Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/39773 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
22 lines
352 B
JavaScript
22 lines
352 B
JavaScript
// Flags: --expose-internals
|
|
'use strict';
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
const {
|
|
MessageEvent,
|
|
} = require('internal/worker/io');
|
|
|
|
[
|
|
'data',
|
|
'origin',
|
|
'lastEventId',
|
|
'source',
|
|
'ports',
|
|
].forEach((i) => {
|
|
assert.throws(() => Reflect.get(MessageEvent.prototype, i, {}), {
|
|
code: 'ERR_INVALID_THIS',
|
|
});
|
|
});
|