Skip to content

Commit

Permalink
feat(datepicker): update test case
Browse files Browse the repository at this point in the history
  • Loading branch information
dilandoogan committed Jan 7, 2025
1 parent e3e9b2a commit 66d7b65
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/datepicker/bl-datepicker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,20 @@ describe("BlDatepicker", () => {
element._selectedDates = [new Date(2023, 1, 1)];
await element.updateComplete;

element.addEventListener("bl-datepicker-change", (event) => {
const customEvent = event as CustomEvent;

expect(customEvent).to.exist;
expect(customEvent.detail).to.deep.equal([]);

});

const clearButton = element.shadowRoot?.querySelector("bl-button") as BlButton;

clearButton?.click();
await element.updateComplete;


expect(element._selectedDates).to.deep.equal([]);
expect(element._inputValue).to.equal("");
});
Expand Down

0 comments on commit 66d7b65

Please sign in to comment.