-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* #532 Added session and request logging to each logger message using cls * #532 Fixxed errors in unit tests * #532 Updated cls service injection * #532 Added error handling for logger * #532 Updated yarn dependencies * #532 Add condition for user.lastActiveAt if its the first login so * #532 Added await in crisp service so error is caught in async function * Update package.json Fix syntax, missing comma --------- Co-authored-by: Kylee Fields <[email protected]>
- Loading branch information
1 parent
8746e54
commit 7a391af
Showing
13 changed files
with
127 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,8 @@ import { | |
mockPartnerAccessRepositoryMethods, | ||
mockPartnerRepositoryMethods, | ||
mockUserRepositoryMethodsFactory, | ||
mockClsService, | ||
mockUserRepositoryMethods, | ||
} from 'test/utils/mockedServices'; | ||
import { Repository } from 'typeorm'; | ||
import { createQueryBuilderMock } from '../../test/utils/mockUtils'; | ||
|
@@ -36,6 +38,7 @@ import { AdminUpdateUserDto } from './dtos/admin-update-user.dto'; | |
import { CreateUserDto } from './dtos/create-user.dto'; | ||
import { UpdateUserDto } from './dtos/update-user.dto'; | ||
import { UserService } from './user.service'; | ||
import {Logger} from '../logger/logger'; | ||
|
||
const createUserDto: CreateUserDto = { | ||
email: '[email protected]', | ||
|
@@ -120,6 +123,8 @@ describe('UserService', () => { | |
}).compile(); | ||
|
||
service = module.get<UserService>(UserService); | ||
const logger = (service as any).logger as Logger; | ||
(logger as any).cls = mockClsService; | ||
repo = module.get<Repository<UserEntity>>(getRepositoryToken(UserEntity)); | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters