1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

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

@ -67,7 +67,12 @@ if (typeof PDFJSDev !== 'undefined' &&
typeof requirejs !== 'undefined' && requirejs.load;
fakeWorkerFilesLoader = useRequireEnsure ? (function (callback) {
require.ensure([], function () {
var worker = require('./pdf.worker.js');
var worker;
if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('LIB')) {
worker = require('../pdf.worker.js');
} else {
worker = require('./pdf.worker.js');
}
callback(worker.WorkerMessageHandler);
});
}) : dynamicLoaderSupported ? (function (callback) {