Skip to content

Commit fbd2633

Browse files
committed
test(string): getClassNames对象类型参数不再限制值的类型
1 parent 7738d26 commit fbd2633

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

__tests__/string.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,10 @@ describe('string', function () {
243243
expect(getClassNames('a', 'b')).toBe('a b');
244244
expect(getClassNames({ a: true, b: false, c: true })).toBe('a c');
245245
expect(getClassNames('a', 'b', { a: true, b: false, c: true })).toBe('a b c');
246-
expect(getClassNames(' ', 'a', ' ', 'b', ' ', 'c', { a: true, b: false, c: true })).toBe(
246+
expect(getClassNames(' ', 'a', ' ', 'b', ' ', 'c', { a: true, b: '', c: true })).toBe(
247247
'a b c',
248248
);
249+
expect(getClassNames({ a: true, b: ' ', c: '' })).toBe('a b');
250+
expect(getClassNames({ a: true, b: 1, c: 0 })).toBe('a b');
249251
});
250252
});

0 commit comments

Comments
 (0)