Skip to content

Commit

Permalink
4840 multi workspace update user userworkspace inconsistent on delete…
Browse files Browse the repository at this point in the history
… set null constraint (twentyhq#5373)
  • Loading branch information
martmull committed May 13, 2024
1 parent 8576127 commit 0018ec7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions packages/twenty-server/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ module.exports = {
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
},
fakeTimers: {
enableGlobally: true,
},
collectCoverageFrom: ['**/*.(t|j)s'],
coverageDirectory: '../coverage',
};
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -176,7 +173,7 @@ describe('TokenService', () => {
where: {
value: hashedToken,
type: AppTokenType.PasswordResetToken,
expiresAt: MoreThan(mockedNewDate),
expiresAt: MoreThan(new Date()),
revokedAt: IsNull(),
},
});
Expand Down

0 comments on commit 0018ec7

Please sign in to comment.