forked from enviPath/enviPy
Current Dev State
This commit is contained in:
19
static/js/ketcher2/node_modules/ttf2woff2/tests/cli.mocha.js
generated
vendored
Normal file
19
static/js/ketcher2/node_modules/ttf2woff2/tests/cli.mocha.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
var fs = require('fs');
|
||||
var assert = require('assert');
|
||||
|
||||
describe('Testing CLI', function() {
|
||||
|
||||
it("should work", function(done) {
|
||||
this.timeout(5000);
|
||||
assert.deepEqual(
|
||||
(require('child_process').execSync)(
|
||||
'node ' + __dirname + '/../bin/ttf2woff2.js', {
|
||||
input: fs.readFileSync(__dirname + '/expected/iconsfont.ttf')
|
||||
}
|
||||
),
|
||||
fs.readFileSync(__dirname + '/expected/iconsfont.woff2')
|
||||
);
|
||||
done();
|
||||
});
|
||||
|
||||
});
|
||||
BIN
static/js/ketcher2/node_modules/ttf2woff2/tests/expected/iconsfont.ttf
generated
vendored
Normal file
BIN
static/js/ketcher2/node_modules/ttf2woff2/tests/expected/iconsfont.ttf
generated
vendored
Normal file
Binary file not shown.
BIN
static/js/ketcher2/node_modules/ttf2woff2/tests/expected/iconsfont.woff2
generated
vendored
Normal file
BIN
static/js/ketcher2/node_modules/ttf2woff2/tests/expected/iconsfont.woff2
generated
vendored
Normal file
Binary file not shown.
50
static/js/ketcher2/node_modules/ttf2woff2/tests/tests.mocha.js
generated
vendored
Executable file
50
static/js/ketcher2/node_modules/ttf2woff2/tests/tests.mocha.js
generated
vendored
Executable file
@ -0,0 +1,50 @@
|
||||
var fs = require('fs');
|
||||
var assert = require('assert');
|
||||
|
||||
describe('ttf2woff2', function() {
|
||||
|
||||
it('should work from the main endpoint', function(done) {
|
||||
this.timeout(10000);
|
||||
var ttf2woff2 = require('../src/index');
|
||||
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();
|
||||
});
|
||||
|
||||
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();
|
||||
});
|
||||
|
||||
it('should work from the emscripten endpoint', function(done) {
|
||||
this.timeout(10000);
|
||||
var ttf2woff2 = require('../jssrc/index.js');
|
||||
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();
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user