Skip to content

Commit

Permalink
fix(tests): cover typeorm log adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Oct 4, 2019
1 parent ed66591 commit 6a52c2b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/utils/logger/TestStorageLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,16 @@ describeLeaks('storage logger', async () => {
logger.logSchemaBuild('foo');
expect(info).to.have.callCount(1);
});

itLeaks('should log messages with passed level', async () => {
const { container, module } = await createContainer();
const info = spy();
module.bind(INJECT_LOGGER).toInstance(spyLogger({
info,
}));

const logger = await container.create(StorageLogger);
logger.log('info', 'foo');
expect(info).to.have.callCount(1);
});
});

0 comments on commit 6a52c2b

Please sign in to comment.