hfg-gmuend / openmoji

Open source emojis for designers, developers and everyone else!
http://openmoji.org
Creative Commons Attribution Share Alike 4.0 International
3.84k stars 213 forks source link

Add tests to check TTFs have expected tables #464

Closed mavit closed 9 months ago

mavit commented 9 months ago

This checks for the bug reported in #438, and should help prove the fix in #458.

b-g commented 9 months ago

Hi @mavit, many thanks for this! Great!

% npm test

> openmoji@14.0.0 test /Users/bene/Documents/openmoji
> mocha --parallel --reporter min test/*.{js,mjs} --openmoji-data-json $PWD/data/openmoji.json --openmoji-src-folder $PWD/src

  79217 passing (34s)
  2 failing

  1) TTF
       of format color-colr0_svg
         has table
           SVG:
     AssertionError: expected { COLR: COLR{ …(9) }, …(12) } to have property 'SVG'
      at Context.<anonymous> (file:///Users/bene/Documents/openmoji/test/ttf.mjs:36:42)
      at processImmediate (internal/timers.js:461:21)

  2) TTF
       of format color-colr1_svg
         has table
           SVG:
     AssertionError: expected { COLR: COLR{ …(9) }, …(12) } to have property 'SVG'
      at Context.<anonymous> (file:///Users/bene/Documents/openmoji/test/ttf.mjs:36:42)
      at processImmediate (internal/timers.js:461:21)

npm ERR! Test failed.  See above for more details.