Skip to content

Commit

Permalink
fix(database):Fixed tests broken by the change in typeorm logging
Browse files Browse the repository at this point in the history
  • Loading branch information
zakhenry committed Nov 21, 2016
1 parent 30ecd5f commit d8ecda1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,13 @@
<a name="1.0.0-3"></a>
# [1.0.0-3](https://github.com/ubiquits/ubiquits/compare/v1.0.0-2...v1.0.0-3) (2016-11-21)



<a name="1.0.0-2"></a>
# [1.0.0-2](https://github.com/ubiquits/ubiquits/compare/v1.0.0-1...v1.0.0-2) (2016-11-21)



<a name="1.0.0-1"></a>
# [1.0.0-1](https://github.com/ubiquits/ubiquits/compare/v1.0.0-0...v1.0.0-1) (2016-11-20)

Expand Down
7 changes: 4 additions & 3 deletions src/server/services/database.service.spec.ts
Expand Up @@ -68,6 +68,7 @@ describe('Database', () => {
username: envMap.DB_USERNAME,
password: envMap.DB_PASSWORD,
database: envMap.DB_DATABASE,
usePool: false,
},
autoSchemaSync: false,
logging: {
Expand Down Expand Up @@ -128,15 +129,15 @@ describe('Database', () => {

const logFunction = createConnectionSpy.calls.mostRecent().args[0].logging.logger;

logFunction('log with level log', 'log');
logFunction('log', 'log with level log');
expect(logFunctionSpy)
.toHaveBeenCalledWith('info', 'log with level log');

logFunction('log with level warn', 'warn');
logFunction('warn', 'log with level warn');
expect(logFunctionSpy)
.toHaveBeenCalledWith('warning', 'log with level warn');

logFunction('log with level error', 'error');
logFunction('error', 'log with level error');
expect(logFunctionSpy)
.toHaveBeenCalledWith('error', 'log with level error');

Expand Down

0 comments on commit d8ecda1

Please sign in to comment.