Skip to content

Commit

Permalink
fix(ld-checkbox): remove redundant input event dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
borisdiakur committed Nov 16, 2021
1 parent b063726 commit 0e95969
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/liquid/components/ld-checkbox/ld-checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ export class LdCheckbox implements InnerFocusable {
}

this.checked = !this.checked
this.el.dispatchEvent(new Event('input', { bubbles: true, composed: true }))
}

componentWillLoad() {
Expand Down
14 changes: 0 additions & 14 deletions src/liquid/components/ld-checkbox/test/ld-checkbox.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,6 @@ describe('ld-checkbox', () => {
expect(spyBlur).toHaveBeenCalled()
})

it('emits input event on click', async () => {
const page = await newSpecPage({
components: [LdCheckbox],
html: `<ld-checkbox></ld-checkbox>`,
})
const ldCheckbox = page.root

const spyInput = jest.fn()
ldCheckbox.addEventListener('input', spyInput)
ldCheckbox.click()

expect(spyInput).toHaveBeenCalled()
})

it('allows to set inner focus', async () => {
const page = await newSpecPage({
components: [LdCheckbox],
Expand Down

0 comments on commit 0e95969

Please sign in to comment.