diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9d445b4b..edf3ddfba 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,7 @@ These will automatically watch the filesystem for changes, and restart when need There are also two development settings you have to change to develop the frontend. -Before commiting your changes, you should run `yarn lint` to fix any linting errors. +Before commiting your changes, you should run `yarn lint` and `yarn lint --fix` to fix any linting errors. You should also use `yarn test` to ensure there are no regressions. diff --git a/server/test/integration/auth.js b/server/test/integration/auth.js index 720f76299..f8bc31a6a 100644 --- a/server/test/integration/auth.js +++ b/server/test/integration/auth.js @@ -17,7 +17,7 @@ beforeAll(async () => { await app.ready() }) -test('cleanup test user', async () => { +afterAll('cleanup test user', async () => { config.email = oldEmail await removeUserByEmail({ email: testUser.email diff --git a/server/test/integration/challenges.js b/server/test/integration/challenges.js index 645359ca3..bba246643 100644 --- a/server/test/integration/challenges.js +++ b/server/test/integration/challenges.js @@ -17,7 +17,7 @@ beforeAll(async () => { uuid = testUserData.user.id }) -test('cleanup test user', async () => { +afterAll('cleanup test user', async () => { await testUserData.cleanup() }) diff --git a/server/test/integration/profile.js b/server/test/integration/profile.js index 1b7b86c97..eee4bd215 100644 --- a/server/test/integration/profile.js +++ b/server/test/integration/profile.js @@ -37,7 +37,7 @@ test('succeeds with goodUserData', async () => { expect(resp.body.data.name).toBe(testUser.name) }) -test('cleanup test user', async () => { +afterAll('cleanup test user', async () => { await removeUserByEmail({ email: testUser.email }) diff --git a/server/test/integration/submit.js b/server/test/integration/submit.js index b0efd27dd..99d97ea33 100644 --- a/server/test/integration/submit.js +++ b/server/test/integration/submit.js @@ -20,7 +20,7 @@ beforeAll(async () => { uuid = testUserData.user.id }) -test('cleanup test user', async () => { +afterAll('cleanup test user', async () => { await db.solves.removeSolvesByUserId({ userid: uuid }) await testUserData.cleanup() }) diff --git a/server/test/integration/submitTiming.js b/server/test/integration/submitTiming.js index 78eef2feb..e1b7351cf 100644 --- a/server/test/integration/submitTiming.js +++ b/server/test/integration/submitTiming.js @@ -19,7 +19,7 @@ beforeAll(async () => { uuid = testUserData.user.id }) -test('cleanup test user', async () => { +afterAll('cleanup test user', async () => { await testUserData.cleanup() })