We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e57c9a5 commit e3d862dCopy full SHA for e3d862d
packages/utils/test/string.test.ts
@@ -1,10 +1,12 @@
1
import { truncate } from '../src';
2
3
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
- );
+ test('it works as expected', () => {
+ expect(truncate('lolol', 3)).toEqual('lol\u2026');
+ expect(truncate('lolol', 10)).toEqual('lolol');
+ expect(truncate('lol', 3)).toEqual('lol');
+ expect(truncate(new Array(1000).join('f'), 0)).toEqual(
+ new Array(1000).join('f'),
10
+ );
11
+ });
12
});
0 commit comments