Skip to content

Commit

Permalink
fix: cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
si3nloong committed Oct 26, 2021
1 parent 5065b61 commit a723048
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
File renamed without changes.
8 changes: 7 additions & 1 deletion components/date-picker/__test__/datetime.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isLeapYear, toDateString } from "../src/datetime";
import { isValidDate, isLeapYear, toDateString } from "../src/datetime";

test("Test isLeapYear", () => {
expect(isLeapYear(2000)).toBeTruthy();
Expand All @@ -17,3 +17,9 @@ test("Test toDateString", () => {
expect(toDateString(new Date(2021, 10, 1))).toBe("2021-11-01");
expect(toDateString(new Date(2021, 3, 25))).toBe("2021-04-25");
});

test("Test isValidDate", () => {
expect(isValidDate("abcd")).toBeFalsy();
expect(isValidDate("2021-01-01")).toBeTruthy();
// expect(isValidDate("2021-02-30")).toBeFalsy();
});
8 changes: 8 additions & 0 deletions stories/Button.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
</Button>
</Template>

<Story
name="Primary"
args={{
variant: "primary",
label: "Button",
}}
/>

<Story
name="Default"
args={{
Expand Down

0 comments on commit a723048

Please sign in to comment.