Skip to content

Commit

Permalink
ts-ignore
Browse files Browse the repository at this point in the history
Just to make the 'yarn build' script happy. Even though the test isn't needed for the build, it first validates all files with 'tsc --noEmit'. I couldn't find a way to exclude the test files in this case, so just added an ignore.
  • Loading branch information
dacook committed Feb 13, 2024
1 parent 819ee81 commit d0ee821
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions spec/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ describe('#nestedForm', (): void => {
const controllerElement: HTMLButtonElement = document.querySelector("[data-controller='nested-form']")
const addButton: HTMLButtonElement = document.querySelector("[data-action='nested-form#add']")

// @ts-ignore following line
jest.spyOn(global, 'Event').mockImplementation((type: string, eventInit?: any) => ({ type, eventInit }))
const mockDispatchEvent = jest.spyOn(controllerElement, 'dispatchEvent').mockImplementation(() => true)

Expand Down

0 comments on commit d0ee821

Please sign in to comment.