Skip to content

Commit 2759d73

Browse files
authored
refactor(sdk-trace-node): fix eslint warning (#5387)
1 parent 23adb2b commit 2759d73

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/opentelemetry-sdk-trace-node/test/registration.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-ho
2727
import { CompositePropagator } from '@opentelemetry/core';
2828
import { NodeTracerProvider } from '../src';
2929

30-
const assertInstanceOf = (actual: object, ExpectedInstance: Function) => {
30+
// Here we are looking for a `AnyConstructor` type, and `Function` is a close
31+
// enough approximation that exists in the standard library.
32+
// eslint-disable-next-line @typescript-eslint/ban-types
33+
const assertInstanceOf = (actual: object, ExpectedConstructor: Function) => {
3134
assert.ok(
32-
actual instanceof ExpectedInstance,
33-
`Expected ${inspect(actual)} to be instance of ${ExpectedInstance.name}`
35+
actual instanceof ExpectedConstructor,
36+
`Expected ${inspect(actual)} to be instance of ${ExpectedConstructor.name}`
3437
);
3538
};
3639

0 commit comments

Comments
 (0)