Skip to content

Commit

Permalink
Merge pull request #117 from pulibrary/inputSelect-two-change-events
Browse files Browse the repository at this point in the history
Declare the emits used in inputSelect
  • Loading branch information
christinach authored Mar 1, 2024
2 parents 14d73c5 + ae95d88 commit 76f3178
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/LuxInputSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default {
return this.errormessage.length
},
},
emits: ["change", "inputblur"],
props: {
/**
* Sets the value of the selected option.
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/specs/components/luxInputSelect.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("LuxInputSelect.vue", () => {
const select = wrapper.find("select")
select.trigger("change")
const emitted = wrapper.emitted()
expect(Object.prototype.hasOwnProperty.call(emitted, "change")).toBe(true)
expect(emitted.change.length).toBe(1)
expect(emitted.change[0]).toEqual(["two"])
})

Expand Down

0 comments on commit 76f3178

Please sign in to comment.