Skip to content

Commit

Permalink
changed some assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
imjordanxd committed Dec 11, 2024
1 parent 90a2272 commit 9ce6d94
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe("base useAsObservableSource should work", () => {
})
expect(container.querySelector("span")!.innerHTML).toBe("22")
expect(counterRender).toBe(2)
expect(observerRender).toBe(3)
expect(observerRender).toBe(4)
expect(consoleWarnMock).toMatchSnapshot()
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ describe("is used to keep observable within component body", () => {
})
expect(container.querySelector("span")!.innerHTML).toBe("22")
expect(counterRender).toBe(2)
expect(observerRender).toBe(3)
expect(observerRender).toBe(4)
expect(consoleWarnMock).toMatchSnapshot()
})

Expand Down Expand Up @@ -377,7 +377,7 @@ describe("is used to keep observable within component body", () => {
})
expect(container.querySelector("span")!.innerHTML).toBe("22")
expect(counterRender).toBe(2)
expect(observerRender).toBe(3)
expect(observerRender).toBe(4)
})

it("with observer()", () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/mobx-react/__tests__/observer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,8 @@ test("should stop updating if error was thrown in render (#134)", () => {
data.set(5)
})
// MWE: not sure if these numbers make sense. Nor whether it really matters
expect(lastOwnRenderCount).toBe(6)
expect(renderingsCount).toBe(6)
expect(lastOwnRenderCount).toBe(4)
expect(renderingsCount).toBe(4)
})

describe("should render component even if setState called with exactly the same props", () => {
Expand Down

0 comments on commit 9ce6d94

Please sign in to comment.