fix: keep one impl for node and browser

This commit is contained in:
gtktsc
2023-04-03 21:25:46 +02:00
parent c759ec43be
commit e4589a1ecd
6 changed files with 1038 additions and 131 deletions

View File

@@ -757,9 +757,9 @@ describe('TextPath', function () {
// just different results in different envs
if (isBrowser) {
assert.equal(Math.round(rect.height), 331, 'check height');
assert.equal(Math.round(rect.height), 330, 'check height');
} else {
assert.equal(Math.round(rect.height), 333, 'check height');
assert.equal(Math.round(rect.height), 332, 'check height');
}
textpath.text('');
@@ -807,7 +807,11 @@ describe('TextPath', function () {
var rect = textpath.getClientRect();
assert.equal(Math.round(rect.width), 299);
assert.equal(Math.round(rect.height), 171);
if (isBrowser) {
assert.equal(Math.round(rect.height), 171);
} else {
assert.equal(Math.round(rect.height), 170);
}
});
it.skip('check vertical text path', function () {