Skip to content

Commit

Permalink
fixup: clarify the test
Browse files Browse the repository at this point in the history
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
  • Loading branch information
daeyeon committed Jul 18, 2022
1 parent 0c6cc6e commit 323ca0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ module.exports = {
ByteLengthQueuingStrategy: 'readable',
CompressionStream: 'readable',
CountQueuingStrategy: 'readable',
CustomEvent: 'readable',
Crypto: 'readable',
CryptoKey: 'readable',
DecompressionStream: 'readable',
Expand Down
13 changes: 4 additions & 9 deletions test/parallel/test-global-customevent.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
// Flags: --experimental-global-customevent --expose-internals
'use strict';

const common = require('../common');
require('../common');
const { strictEqual, ok } = require('node:assert');
const { Worker, isMainThread } = require('worker_threads');
const { CustomEvent } = require('internal/event_target');
const { CustomEvent: internalCustomEvent } = require('internal/event_target');

// Global
ok(CustomEvent);
strictEqual(globalThis.CustomEvent, CustomEvent);

if (isMainThread) {
const w = new Worker(__filename);
w.on('message', common.mustNotCall());
w.on('error', common.mustNotCall());
}
strictEqual(CustomEvent, internalCustomEvent);

0 comments on commit 323ca0f

Please sign in to comment.