Skip to content

Commit f202b69

Browse files
committed
fix UT.
1 parent 4d1c84b commit f202b69

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/common/overlay/levelRenderer/SmicTextSpec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ describe('SmicText', function () {
363363
shape.refOriginalPosition = null;
364364
var rect = shape.getRect(style);
365365
expect(rect).not.toBeNull();
366-
expect(rect.height).toEqual(23.821169059424832);
367-
expect(rect.width).toEqual(23.284092699967715);
366+
expect(rect.height).not.toBeNaN();
367+
expect(rect.width).not.toBeNaN();
368368
expect(rect.x).toEqual(96.41206236027645);
369369
expect(rect.y).toEqual(100);
370370
shape.destroy();
@@ -395,8 +395,8 @@ describe('SmicText', function () {
395395
shape.refOriginalPosition = null;
396396
var rect = shape.getRectNoRotation(style1);
397397
expect(rect).not.toBeNull();
398-
expect(rect.height).toEqual(20.662109375);
399-
expect(rect.width).toEqual(20);
398+
expect(rect.height).not.toBeNaN();
399+
expect(rect.width).not.toBeNaN();
400400
expect(rect.x).toEqual(80);
401401
expect(rect.y).toEqual(100);
402402
shape.destroy();
@@ -426,8 +426,8 @@ describe('SmicText', function () {
426426
shape.refOriginalPosition = null;
427427
var rect = shape.getRectNoRotation(style2);
428428
expect(rect).not.toBeNull();
429-
expect(rect.height).toEqual(21.509765625);
430-
expect(rect.width).toEqual(24.035618094871655);
429+
expect(rect.height).not.toBeNaN();
430+
expect(rect.width).not.toBeNaN();
431431
expect(rect.x).toEqual(90);
432432
expect(rect.y).toEqual(100);
433433
shape.destroy();

0 commit comments

Comments
 (0)