mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +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:
parent
028d3421ac
commit
bbe8c3d8ed
4 changed files with 181 additions and 109 deletions
|
@ -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,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue