Skip to content

Commit

Permalink
added test for uncovered line
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Kuba committed Sep 7, 2022
1 parent b03c464 commit 41e7bbf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions experimental/packages/api-logs/test/api/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ describe('API', () => {
const logger = logs.getLoggerProvider().getLogger('name');
assert.deepStrictEqual(logger, dummyLogger);
});

it('should not allow overriding global provider if already set', () => {
const provider1 = new TestLoggerProvider();
const provider2 = new TestLoggerProvider();
logs.setGlobalLoggerProvider(provider1);
assert.equal(logs.getLoggerProvider(), provider1);
logs.setGlobalLoggerProvider(provider2);
assert.equal(logs.getLoggerProvider(), provider1);
});
});

describe('getLogger', () => {
Expand Down

0 comments on commit 41e7bbf

Please sign in to comment.