Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0a4c96a

Browse filesBrowse files
aduh95danielleadams
authored andcommitted
test: use global.EventTarget instead of internals
`EventTarget` is exposed on the global scope, there is no need to use `--expose-internals` flag in the tests. Refs: #35496 PR-URL: #36002 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 292915a commit 0a4c96a
Copy full SHA for 0a4c96a

File tree

Expand file treeCollapse file tree

5 files changed

+3
-22
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+3
-22
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-abortcontroller.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-abortcontroller.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
// Flags: --no-warnings --expose-internals
1+
// Flags: --no-warnings
22
'use strict';
33

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

66
const { ok, strictEqual } = require('assert');
7-
const { Event } = require('internal/event_target');
87

98
{
109
// Tests that abort is fired with the correct event type on AbortControllers
Collapse file

‎test/parallel/test-eventtarget-once-twice.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-eventtarget-once-twice.js
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
// Flags: --expose-internals --no-warnings
21
'use strict';
32
const common = require('../common');
4-
const {
5-
Event,
6-
EventTarget,
7-
} = require('internal/event_target');
83
const { once } = require('events');
94

105
const et = new EventTarget();
Collapse file

‎test/parallel/test-eventtarget-whatwg-once.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-eventtarget-whatwg-once.js
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
// Flags: --expose-internals --no-warnings
21
'use strict';
32

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

6-
const {
7-
Event,
8-
EventTarget,
9-
} = require('internal/event_target');
10-
115
const {
126
strictEqual,
137
} = require('assert');
Collapse file

‎test/parallel/test-eventtarget.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-eventtarget.js
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
'use strict';
33

44
const common = require('../common');
5-
const {
6-
Event,
7-
EventTarget,
8-
defineEventHandler
9-
} = require('internal/event_target');
5+
const { defineEventHandler } = require('internal/event_target');
106

117
const {
128
ok,
Collapse file

‎test/parallel/test-nodeeventtarget.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-nodeeventtarget.js
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
'use strict';
33

44
const common = require('../common');
5-
const {
6-
Event,
7-
NodeEventTarget,
8-
} = require('internal/event_target');
5+
const { NodeEventTarget } = require('internal/event_target');
96

107
const {
118
deepStrictEqual,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.