Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit59bac76

Browse files
committed
Fix: tests
1 parenteb65490 commit59bac76

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

‎site/jest.setup.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ beforeAll(() =>
99

1010
// Reset any request handlers that we may add during the tests,
1111
// so they don't affect other tests.
12-
afterEach(()=>server.resetHandlers())
12+
afterEach(()=>{
13+
server.resetHandlers()
14+
jest.clearAllMocks()
15+
})
1316

1417
// Clean up after the tests are finished.
1518
afterAll(()=>server.close())

‎site/src/api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
importaxios,{AxiosRequestHeaders}from"axios"
22
import{mutate}from"swr"
3-
import{MockPager,MockUser,MockUser2}from"../test_helpers"
3+
import{MockPager,MockUser,MockUser2}from"../test_helpers/entities"
44
import*asTypesfrom"./types"
55

66
constCONTENT_TYPE_JSON:AxiosRequestHeaders={

‎site/src/pages/preferences/account.test.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ const fillAndSubmitForm = async () => {
3131
}
3232

3333
describe("PreferencesAccountPage",()=>{
34-
afterEach(()=>{
35-
jest.clearAllMocks()
36-
})
37-
3834
describe("when it is a success",()=>{
3935
it("shows the success message",async()=>{
4036
jest.spyOn(API,"updateProfile").mockImplementationOnce((userId,data)=>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp