4840 multi workspace update user userworkspace inconsistent on delete set null constraint (#5373)

This commit is contained in:
martmull 2024-05-13 14:50:27 +02:00 committed by GitHub
parent 8576127b47
commit 0018ec78b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -14,6 +14,9 @@ module.exports = {
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
},
fakeTimers: {
enableGlobally: true,
},
collectCoverageFrom: ['**/*.(t|j)s'],
coverageDirectory: '../coverage',
};

View File

@ -160,9 +160,6 @@ describe('TokenService', () => {
};
const mockUser = { id: '1', email: 'user@example.com' };
const mockedNewDate = new Date();
jest.spyOn(global, 'Date').mockImplementation(() => mockedNewDate);
jest
.spyOn(appTokenRepository, 'findOne')
.mockResolvedValue(mockToken as AppToken);
@ -176,7 +173,7 @@ describe('TokenService', () => {
where: {
value: hashedToken,
type: AppTokenType.PasswordResetToken,
expiresAt: MoreThan(mockedNewDate),
expiresAt: MoreThan(new Date()),
revokedAt: IsNull(),
},
});