Skip to content

Commit

Permalink
Remove unused type
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Apr 7, 2021
1 parent d32ff73 commit 7abb184
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ import { GatsbyImage, IGatsbyImageData } from "../gatsby-image.browser"
import { render, waitFor } from "@testing-library/react"
import * as hooks from "../hooks"

type GlobalOverride = NodeJS.Global &
typeof global.globalThis & {
// eslint-disable-next-line @typescript-eslint/naming-convention
GATSBY___IMAGE: boolean
SERVER: boolean
}

// Prevents terser for bailing because we're not in a babel plugin
jest.mock(`../../../macros/terser.macro`, () => (strs): string => strs.join(``))

Expand Down Expand Up @@ -165,7 +158,7 @@ describe(`GatsbyImage browser`, () => {
container.querySelector(`[data-main-image=""]`)
)

img.dispatchEvent(new Event(`load`))
img?.dispatchEvent(new Event(`load`))

expect(onStartLoadSpy).toBeCalledWith({ wasCached: false })
expect(onLoadSpy).toBeCalled()
Expand Down

0 comments on commit 7abb184

Please sign in to comment.