Skip to content

Commit fc2bb86

Browse files
committed
test(string): getClassNames
1 parent f7a0d31 commit fc2bb86

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

β€Ž__tests__/string.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,14 @@ describe('string', function () {
227227
expect(hideString('πŸ‘¨β€πŸ‘¨β€πŸ‘§β€πŸ‘¦helloπŸ‘¨β€πŸ‘¨β€πŸ‘§worldπŸ‘¨β€πŸ‘¨β€πŸ‘§β€πŸ‘¦', { len: 11, end: -1 })).toBe('πŸ‘¨β€πŸ‘¨β€πŸ‘§β€πŸ‘¦***********πŸ‘¨β€πŸ‘¨β€πŸ‘§β€πŸ‘¦');
228228
});
229229
});
230+
test('getClassNames', () => {
231+
const getClassNames = cm.getClassNames;
232+
233+
expect(getClassNames('a', 'b')).toBe('a b');
234+
expect(getClassNames({ a: true, b: false, c: true })).toBe('a c');
235+
expect(getClassNames('a', 'b', { a: true, b: false, c: true })).toBe('a b c');
236+
expect(getClassNames(' ', 'a', ' ', 'b', ' ', 'c', { a: true, b: false, c: true })).toBe(
237+
'a b c',
238+
);
239+
});
230240
});

0 commit comments

Comments
Β (0)