Skip to content

Commit 6346698

Browse files
committed
test: 修复测试
1 parent ea07a91 commit 6346698

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/s2-core/__tests__/unit/utils/text-spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ describe('Text Utils Tests', () => {
7373

7474
test('should get correct text width', () => {
7575
const width = measureTextWidth('test', font);
76-
expect(Math.floor(width)).toEqual(21);
76+
expect(Math.floor(width)).toEqual(16);
7777
});
7878

7979
test('should get correct text width roughly', () => {
8080
const width = measureTextWidth('test', font);
81-
expect(Math.floor(width)).toEqual(21);
81+
expect(Math.floor(width)).toEqual(16);
8282
});
8383

8484
test('should get correct ellipsis text inner', () => {
85-
const text = getEllipsisTextInner('test', 20, font);
85+
const text = getEllipsisTextInner('test', 15, font);
8686
expect(text).toEqual('t...');
8787
});
8888

0 commit comments

Comments
 (0)