Skip to content

Commit b56ffd9

Browse files
committed
multipleResolve is always supported in Node >= 10.17.0
1 parent 662a766 commit b56ffd9

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

test/helpers/events/main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { unhandledRejection } from './unhandled_rejection.js'
88
import { rejectionHandled } from './rejection_handled.js'
99
import { multipleResolves } from './multiple_resolves.js'
1010
import { warning } from './warning.js'
11-
import { hasMultipleResolves } from './version.js'
1211

1312
const getEventsMap = function() {
1413
return mapValues(EVENTS_SIMPLE_MAP, getEvent)
@@ -18,7 +17,7 @@ const EVENTS_SIMPLE_MAP = {
1817
uncaughtException,
1918
unhandledRejection,
2019
rejectionHandled,
21-
...(hasMultipleResolves() ? { multipleResolves } : {}),
20+
multipleResolves,
2221
warning,
2322
}
2423

test/helpers/events/version.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ import { version } from 'process'
22

33
import semver from 'semver'
44

5-
// `multipleResolves` was introduced in Node `10.12.0`
6-
export const hasMultipleResolves = function() {
7-
return semver.gte(version, MULTIPLE_RESOLVES_V)
8-
}
9-
10-
const MULTIPLE_RESOLVES_V = '10.12.0'
11-
125
// `--unhandled-rejections` was introduced in Node `12.0.0`
136
export const hasUnhandledFlag = function() {
147
return semver.gte(version, UNHANDLED_FLAG_V)

0 commit comments

Comments
 (0)