Skip to content

Commit

Permalink
Fix typescript jest issue in forgotPassword.test.ts (#2110)
Browse files Browse the repository at this point in the history
* don't throw an error if checkYarn is null or checkYarn.stdout is null or undefined

* make sure to check if this version is less than the latest version (newapp)

* fix forgotpassword test template, sync auth example tests

* revert to ensure monorepo tests work

* revert to original password and index tests

* remove merge reference

Co-authored-by: Roshan Manuel <Roshan,[email protected]>
Co-authored-by: Brandon Bayer <[email protected]>
  • Loading branch information
3 people authored Mar 17, 2021
1 parent c574e28 commit 12f5339
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/auth/app/auth/mutations/forgotPassword.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ beforeEach(async () => {

const generatedToken = "plain-token"
jest.mock("@blitzjs/core/server", () => ({
...jest.requireActual("@blitzjs/core/server")!,
...jest.requireActual<object>("@blitzjs/core/server")!,
generateToken: () => generatedToken,
}))
jest.mock("preview-email", () => jest.fn())
Expand Down
4 changes: 2 additions & 2 deletions examples/auth/app/pages/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {render} from "test/utils"
import Home from "./index"

jest.mock("@blitzjs/core", () => ({
...jest.requireActual("@blitzjs/core")!,
...jest.requireActual<object>("@blitzjs/core")!,
useQuery: () => [
{
id: 1,
Expand All @@ -24,4 +24,4 @@ test("renders blitz documentation link", () => {
const element = getByText(/powered by blitz/i)
// @ts-ignore
expect(element).toBeInTheDocument()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ beforeEach(async () => {

const generatedToken = "plain-token"
jest.mock("blitz", () => ({
...jest.requireActual("blitz")!,
...jest.requireActual<object>("blitz")!,
generateToken: () => generatedToken,
}))
jest.mock("preview-email", () => jest.fn())
Expand Down

0 comments on commit 12f5339

Please sign in to comment.