Skip to content

Commit 51086b1

Browse files
committed
cleanup
1 parent f04c403 commit 51086b1

File tree

1 file changed

+6
-11
lines changed
  • packages/dd-trace/test/setup

1 file changed

+6
-11
lines changed

packages/dd-trace/test/setup/core.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,14 @@ function withVersions (plugin, modules, range, cb) {
7979
// use external in instrumentation
8080
instrumentations.push(external)
8181
} else {
82-
// node version not satisifed
8382
// don't add this external, and remove all other instrumentations from testing with overlapping versions
8483
instrumentations = instrumentations.filter(instrumentation => {
85-
return instrumentation.versions
86-
.reduce((crossed, instVersion) => {
87-
external.versions.forEach(extVersion => crossed.push([instVersion, extVersion]))
88-
return crossed
89-
}
90-
, []) // cross instrumentation versions with externals versions
91-
.reduce((matches, versions) => {
92-
const [instVersion, extVersion] = versions
93-
return matches && !semver.intersects(instVersion, extVersion)
94-
}, true) // filter on matching overlaps
84+
return instrumentation.versions.reduce((matches, instVersion) => {
85+
external.versions.forEach(extVersion => {
86+
matches = matches && !semver.intersects(instVersion, extVersion)
87+
})
88+
return matches
89+
}, true)
9590
})
9691
}
9792
})

0 commit comments

Comments
 (0)