Skip to content

Commit 6f63e57

Browse files
committed
chore: fix tests
1 parent 1942e2a commit 6f63e57

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

packages/opentelemetry-tracing/test/BasicTracerProvider.test.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -238,19 +238,17 @@ describe('BasicTracerProvider', () => {
238238
delete envSource.OTEL_TRACES_EXPORTER;
239239
});
240240

241-
it('warns if there is no exporter registered with a given name', () => {
242-
const warnStub = sinon.spy(diag, 'warn');
241+
it('logs error if there is no exporter registered with a given name', () => {
242+
const errorStub = sinon.spy(diag, 'error');
243243

244244
envSource.OTEL_TRACES_EXPORTER = 'missing-exporter';
245245
const provider = new BasicTracerProvider({});
246246
provider.register();
247-
248247
assert.ok(
249-
warnStub.calledOnceWithExactly(
248+
errorStub.getCall(0).args[0] ===
250249
'Exporter "missing-exporter" requested through environment variable is unavailable.'
251-
)
252250
);
253-
warnStub.restore();
251+
errorStub.restore();
254252
});
255253

256254
it('registers trace exporter from environment variable', () => {

0 commit comments

Comments
 (0)