Enable running a subset of the API unit-tests on Travis

Notably, this patch skips all canvas rendering tests in Node.js.
This commit is contained in:
Jonas Jenwald 2017-04-08 17:09:54 +02:00
parent 028d3421ac
commit bbe8c3d8ed
4 changed files with 181 additions and 109 deletions

View file

@ -15,6 +15,14 @@
import { CMapCompressionType } from '../../src/shared/util';
class NodeFileReaderFactory {
static fetch(params) {
var fs = require('fs');
var file = fs.readFileSync(params.path);
return new Uint8Array(file);
}
}
class NodeCMapReaderFactory {
constructor({ baseUrl = null, isCompressed = false, }) {
this.baseUrl = baseUrl;
@ -47,5 +55,6 @@ class NodeCMapReaderFactory {
}
export {
NodeFileReaderFactory,
NodeCMapReaderFactory,
};