Uh oh!
There was an error while loading. Please reload this page.
mocha: non-existent fonts in OS report as pending - #226
Conversation
| it('should re-encode variation glyphs', function(done) { | ||
| if (!fs.existsSync('/Library/Fonts/Skia.ttf')) return done(); | ||
| if (!fs.existsSync('/Library/Fonts/Skia.ttf')) return this.skip(); |
There was a problem hiding this comment.
surely this should be an error, to be thrown instead, through an assertion after openSync that reports "font not found"? Skipping tests because the font files don't exist effectively introduces potential bugs as a side effect of (accidentally) removing a font
There was a problem hiding this comment.
No, this PR is just addresses to solve potential bugs about which you writes. These are fonts that are not available in the repository for legal reasons. They are only in filesystem on OS, especially on MacOS.
If someone does not have these fonts, tests cannot fail with error message "font not found", they would never pass the tests and this is wrong behavior. Previously without existence of a file, tests passed "silently". Now is skipped it and is reported to user. This is the expected correct behavior in mocha tests.
Some tests without font file availability in OS have been marked as passing, even if they were skipped.
Now tests are marked as pending.