Skip to content

Commit 1594fd7

Browse files
committed
move dts tests to tests/
1 parent dec702a commit 1594fd7

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

classnames-test.ts renamed to tests/types.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import classNames from 'classnames';
22
import dedupe from 'classnames/dedupe';
33
import bind from 'classnames/bind';
44

5-
// index
5+
// default
66
classNames('foo');
77
classNames(null);
88
classNames(undefined);
@@ -23,6 +23,23 @@ classNames([Symbol()]);
2323
// $ExpectError
2424
classNames([[Symbol()]]);
2525

26+
// should match tests/index.js
27+
classNames('c', ['a', 'b']);
28+
classNames('', 'b', {}, '');
29+
classNames('a', 0, null, undefined, true, 1, 'b');
30+
classNames('a', [[]]);
31+
classNames('a', []);
32+
classNames('c', ['a', 'b']);
33+
classNames(['a', 'b']);
34+
classNames(['a', 'b'], 'c');
35+
classNames(['a', 'b'], ['c', 'd']);
36+
classNames(['a', 0, null, undefined, false, true, 'b']);
37+
classNames(['a', ['b', 'c']]);
38+
classNames(['a', ['b', ['c', {d: true}]]]);
39+
classNames(['a', {b: true, c: false}]);
40+
classNames({a: true}, 'b', 0);
41+
classNames({}, Infinity, [{}, []]);
42+
2643
// dedupe
2744
dedupe('foo');
2845
dedupe(null);

0 commit comments

Comments
 (0)