Skip to content

Commit e3d862d

Browse files
committed
test: Fix string utils tests
1 parent e57c9a5 commit e3d862d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/utils/test/string.test.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { truncate } from '../src';
22

33
describe('truncate()', () => {
4-
expect(truncate('lolol', 3)).toEqual('lol\u2026');
5-
expect(truncate('lolol', 10)).toEqual('lolol');
6-
expect(truncate('lol', 3)).toEqual('lol');
7-
expect(truncate(new Array(1000).join('f'), 0)).toEqual(
8-
new Array(1000).join('f'),
9-
);
4+
test('it works as expected', () => {
5+
expect(truncate('lolol', 3)).toEqual('lol\u2026');
6+
expect(truncate('lolol', 10)).toEqual('lolol');
7+
expect(truncate('lol', 3)).toEqual('lol');
8+
expect(truncate(new Array(1000).join('f'), 0)).toEqual(
9+
new Array(1000).join('f'),
10+
);
11+
});
1012
});

0 commit comments

Comments
 (0)