Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should work from the native build', function(done) {
var ttf2woff2 = require('bindings')('addon.node').convert;
var inputContent = fs.readFileSync(__dirname + '/expected/iconsfont.ttf');
var outputContent = ttf2woff2(inputContent);
assert.equal(outputContent.length, 1072);
assert.equal(outputContent[1071], 0);
assert.deepEqual(
outputContent,
fs.readFileSync(__dirname + '/expected/iconsfont.woff2')
);
done();
});
'use strict';
try {
module.exports = require('bindings')('addon.node').convert;
} catch (err) {
module.exports = require('../jssrc/index.js');
}