mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
refactor: clean class (#26879)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { cleanClass } from '$lib';
|
||||
|
||||
describe('cleanClass', () => {
|
||||
it('should return a string of class names', () => {
|
||||
expect(cleanClass('class1', 'class2', 'class3')).toBe('class1 class2 class3');
|
||||
});
|
||||
|
||||
it('should filter out undefined, null, and false values', () => {
|
||||
expect(cleanClass('class1', undefined, 'class2', null, 'class3', false)).toBe('class1 class2 class3');
|
||||
});
|
||||
|
||||
it('should unnest arrays', () => {
|
||||
expect(cleanClass('class1', ['class2', 'class3'])).toBe('class1 class2 class3');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user