mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Adds tests for node_stream
This commit is contained in:
parent
18ede8c65d
commit
d16709f5e4
7 changed files with 419 additions and 172 deletions
|
@ -43,6 +43,8 @@
|
|||
function initializePDFJS(callback) {
|
||||
Promise.all([
|
||||
'pdfjs/display/global',
|
||||
'pdfjs/display/api',
|
||||
'pdfjs/display/network',
|
||||
'pdfjs-test/unit/annotation_spec',
|
||||
'pdfjs-test/unit/api_spec',
|
||||
'pdfjs-test/unit/bidi_spec',
|
||||
|
@ -72,7 +74,11 @@ function initializePDFJS(callback) {
|
|||
return SystemJS.import(moduleName);
|
||||
})).then(function (modules) {
|
||||
var displayGlobal = modules[0];
|
||||
var displayApi = modules[1];
|
||||
var PDFNetworkStream = modules[2].PDFNetworkStream;
|
||||
|
||||
// Set network stream class for unit tests.
|
||||
displayApi.setPDFNetworkStreamClass(PDFNetworkStream);
|
||||
// Configure the worker.
|
||||
displayGlobal.PDFJS.workerSrc = '../../build/generic/build/pdf.worker.js';
|
||||
// Opt-in to using the latest API.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue