Skip to content

Commit

Permalink
test: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
aojunhao123 committed Dec 31, 2024
1 parent 3fa6208 commit 5c51531
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,9 @@ test('should contain preseted palettes', () => {
]);
expect([...presetPalettes.blue]).toEqual(presetBlueColors);
});

test('Generate grey colors', () => {
// 测试灰色(h=0, s=0 的特殊情况)
expect(generate('#666666')).toBeTruthy();
expect(generate('#666666', { theme: 'dark' })).toBeTruthy();
});

0 comments on commit 5c51531

Please sign in to comment.