Skip to content

Commit

Permalink
fix(back-e2e): use restoreAllMocks to actually restore function behavior
Browse files Browse the repository at this point in the history
Took me above an hour to figure out what the fuck was wrong with this. I'm so pissed.
  • Loading branch information
tsa96 committed Nov 30, 2023
1 parent a26dcfd commit 709c818
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/backend-e2e/src/auth.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ describe('Auth', () => {
});
});

afterAll(() => jest.resetAllMocks());
afterAll(() => jest.restoreAllMocks());

describe('when given a valid login for a new user', () => {
beforeAll(async () => {
Expand Down Expand Up @@ -502,7 +502,7 @@ describe('Auth', () => {

afterEach(async () => db.cleanup('user'));

afterAll(() => jest.resetAllMocks());
afterAll(() => jest.restoreAllMocks());

it('should create a new user and respond with a game JWT', async () => {
const userSteamID = 1n;
Expand Down

0 comments on commit 709c818

Please sign in to comment.