34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
|
From 33a0fef9cc9103f873aa45dbdcb4fe99c2fffecb Mon Sep 17 00:00:00 2001
|
||
|
From: Philip Chimento <philip.chimento@gmail.com>
|
||
|
Date: Tue, 15 Feb 2022 17:30:42 -0800
|
||
|
Subject: [PATCH] test: Relax assertion in cr.textExtents()
|
||
|
|
||
|
These three values seem to be DPI-dependent, so let's just make sure they
|
||
|
are numbers instead of any particular number.
|
||
|
|
||
|
Closes: #461
|
||
|
---
|
||
|
installed-tests/js/testCairo.js | 6 +++---
|
||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/installed-tests/js/testCairo.js b/installed-tests/js/testCairo.js
|
||
|
index 186d0519d..c0c6d119f 100644
|
||
|
--- a/installed-tests/js/testCairo.js
|
||
|
+++ b/installed-tests/js/testCairo.js
|
||
|
@@ -117,9 +117,9 @@ describe('Cairo', function () {
|
||
|
expect(cr.textExtents('trailing spaces ')).toEqual({
|
||
|
xBearing: 0,
|
||
|
yBearing: -8,
|
||
|
- width: 72,
|
||
|
- height: 10,
|
||
|
- xAdvance: 81,
|
||
|
+ width: jasmine.any(Number),
|
||
|
+ height: jasmine.any(Number),
|
||
|
+ xAdvance: jasmine.any(Number),
|
||
|
yAdvance: 0,
|
||
|
});
|
||
|
});
|
||
|
--
|
||
|
GitLab
|
||
|
|