From cad64dd022c98f334c9cf12600c18a5be4fd1102 Mon Sep 17 00:00:00 2001 From: Connum Date: Sun, 14 Apr 2024 22:03:42 +0200 Subject: [PATCH] fix cvar tests --- test/tables/cvar.js | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/test/tables/cvar.js b/test/tables/cvar.js index 43018537..9415c481 100644 --- a/test/tables/cvar.js +++ b/test/tables/cvar.js @@ -19,22 +19,23 @@ describe('tables/gvar.js', function() { }; }); - - [1].forEach(n => { - const font = fonts[`cvarTest${n}`]; - assert.deepEqual(font.tables.cvar.headers.map(h => h.privatePoints), - Array(11).fill([65,66,67,85,87,93])); - assert.deepEqual(font.tables.cvar.headers.map(h => h.deltas), - [ - [8,-8,8,-11,0,-1], [-2,8,-7,11,0,1], [56,-24,42,6,-10,-4], - [-44,-66,-39,-28,-39,-22], [22,100,36,19,36,19], [8,0,8,-43,-49,-32], - [-8,0,-8,11,9,1], [-80,0,-90,-6,-47,4], [-16,0,-21,28,39,22], - [-46,0,-22,-19,35,-19], [2,0,7,-11,-9,-1] - ]); - }); - [2].forEach(n => { - const font = fonts[`cvarTest${n}`]; - assert.deepEqual(font.tables.cvar.headers.map(h => h.deltas.length), - Array(11).fill(font.tables.cvt.length)); + if('correctly parses cvar deltas', function() { + [1].forEach(n => { + const font = fonts[`cvarTest${n}`]; + assert.deepEqual(font.tables.cvar.headers.map(h => h.privatePoints), + Array(11).fill([65,66,67,85,87,93])); + assert.deepEqual(font.tables.cvar.headers.map(h => h.deltas), + [ + [8,-8,8,-11,0,-1], [-2,8,-7,11,0,1], [56,-24,42,6,-10,-4], + [-44,-66,-39,-28,-39,-22], [22,100,36,19,36,19], [8,0,8,-43,-49,-32], + [-8,0,-8,11,9,1], [-80,0,-90,-6,-47,4], [-16,0,-21,28,39,22], + [-46,0,-22,-19,35,-19], [2,0,7,-11,-9,-1] + ]); + }); + [2].forEach(n => { + const font = fonts[`cvarTest${n}`]; + assert.deepEqual(font.tables.cvar.headers.map(h => h.deltas.length), + Array(11).fill(font.tables.cvt.length)); + }); }); }); \ No newline at end of file