CI fix attempt
Lint / lint (push) Successful in 47s
Test build / test-build (pull_request) Successful in 2m13s

This commit is contained in:
Julien Valverdé
2026-07-27 04:08:23 +02:00
parent f4017a6b95
commit f7a77f4c8a
2 changed files with 16 additions and 8 deletions
+8 -4
View File
@@ -273,6 +273,7 @@ describe("Component", () => {
) )
await screen.findByText("first") await screen.findByText("first")
vi.useFakeTimers()
view.rerender( view.rerender(
<runtime.context.Provider value={effectRuntime}> <runtime.context.Provider value={effectRuntime}>
@@ -280,16 +281,19 @@ describe("Component", () => {
</runtime.context.Provider> </runtime.context.Provider>
) )
await screen.findByText("second") expect(screen.getByText("second")).toBeTruthy()
expect(cleanup).not.toHaveBeenCalled() expect(cleanup).not.toHaveBeenCalled()
await new Promise(resolve => setTimeout(resolve, 5)) await vi.advanceTimersByTimeAsync(19)
expect(cleanup).not.toHaveBeenCalled() expect(cleanup).not.toHaveBeenCalled()
await waitFor(() => expect(cleanup).toHaveBeenCalledWith("first"), { timeout: 100 }) await vi.advanceTimersByTimeAsync(1)
expect(cleanup).toHaveBeenCalledWith("first")
view.unmount() view.unmount()
await waitFor(() => expect(cleanup).toHaveBeenCalledWith("second"), { timeout: 100 }) await vi.advanceTimersByTimeAsync(20)
expect(cleanup).toHaveBeenCalledWith("second")
vi.useRealTimers()
await Effect.runPromise(runtime.runtime.disposeEffect) await Effect.runPromise(runtime.runtime.disposeEffect)
}) })
+8 -4
View File
@@ -277,6 +277,7 @@ describe("Component", () => {
) )
await screen.findByText("first") await screen.findByText("first")
vi.useFakeTimers()
view.rerender( view.rerender(
<runtime.context.Provider value={effectRuntime}> <runtime.context.Provider value={effectRuntime}>
@@ -284,16 +285,19 @@ describe("Component", () => {
</runtime.context.Provider> </runtime.context.Provider>
) )
await screen.findByText("second") expect(screen.getByText("second")).toBeTruthy()
expect(cleanup).not.toHaveBeenCalled() expect(cleanup).not.toHaveBeenCalled()
await new Promise(resolve => setTimeout(resolve, 5)) await vi.advanceTimersByTimeAsync(19)
expect(cleanup).not.toHaveBeenCalled() expect(cleanup).not.toHaveBeenCalled()
await waitFor(() => expect(cleanup).toHaveBeenCalledWith("first"), { timeout: 100 }) await vi.advanceTimersByTimeAsync(1)
expect(cleanup).toHaveBeenCalledWith("first")
view.unmount() view.unmount()
await waitFor(() => expect(cleanup).toHaveBeenCalledWith("second"), { timeout: 100 }) await vi.advanceTimersByTimeAsync(20)
expect(cleanup).toHaveBeenCalledWith("second")
vi.useRealTimers()
await runtime.runtime.dispose() await runtime.runtime.dispose()
}) })