Skip to content

Commit

Permalink
test: cleanup users after tests are run
Browse files Browse the repository at this point in the history
  • Loading branch information
ginkoid committed Aug 9, 2020
1 parent e174530 commit 2ae2d84
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion server/test/integration/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion server/test/integration/challenges.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ beforeAll(async () => {
uuid = testUserData.user.id
})

test('cleanup test user', async () => {
afterAll('cleanup test user', async () => {
await testUserData.cleanup()
})

Expand Down
2 changes: 1 addition & 1 deletion server/test/integration/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down
2 changes: 1 addition & 1 deletion server/test/integration/submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
Expand Down
2 changes: 1 addition & 1 deletion server/test/integration/submitTiming.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ beforeAll(async () => {
uuid = testUserData.user.id
})

test('cleanup test user', async () => {
afterAll('cleanup test user', async () => {
await testUserData.cleanup()
})

Expand Down

0 comments on commit 2ae2d84

Please sign in to comment.