File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,10 @@ beforeAll(() =>
9
9
10
10
// Reset any request handlers that we may add during the tests,
11
11
// so they don't affect other tests.
12
- afterEach ( ( ) => server . resetHandlers ( ) )
12
+ afterEach ( ( ) => {
13
+ server . resetHandlers ( )
14
+ jest . clearAllMocks ( )
15
+ } )
13
16
14
17
// Clean up after the tests are finished.
15
18
afterAll ( ( ) => server . close ( ) )
Original file line number Diff line number Diff line change 1
1
import axios , { AxiosRequestHeaders } from "axios"
2
2
import { mutate } from "swr"
3
- import { MockPager , MockUser , MockUser2 } from "../test_helpers"
3
+ import { MockPager , MockUser , MockUser2 } from "../test_helpers/entities "
4
4
import * as Types from "./types"
5
5
6
6
const CONTENT_TYPE_JSON : AxiosRequestHeaders = {
Original file line number Diff line number Diff line change @@ -31,10 +31,6 @@ const fillAndSubmitForm = async () => {
31
31
}
32
32
33
33
describe ( "PreferencesAccountPage" , ( ) => {
34
- afterEach ( ( ) => {
35
- jest . clearAllMocks ( )
36
- } )
37
-
38
34
describe ( "when it is a success" , ( ) => {
39
35
it ( "shows the success message" , async ( ) => {
40
36
jest . spyOn ( API , "updateProfile" ) . mockImplementationOnce ( ( userId , data ) =>
You can’t perform that action at this time.
0 commit comments