mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Enable running the ui_utils
unit-tests on Travis
With the exception of just one test-case, all the current `ui_utils` unit-tests can run successfully on Node.js (since most of them doesn't rely on the DOM). To get this working, I had to first of all add a new `LIB` build flag such that `gulp lib` produces a `web/pdfjs.js` file that is able to load `pdf.js` successfully. Second of all, since neither `document` nor `navigator` is available in Node.js, `web/ui_utils.js` was adjusted slightly to avoid errors.
This commit is contained in:
parent
5fe26bb9da
commit
ae04cf1c37
5 changed files with 17 additions and 4 deletions
|
@ -77,6 +77,7 @@ var DEFINES = {
|
|||
MINIFIED: false,
|
||||
SINGLE_FILE: false,
|
||||
COMPONENTS: false,
|
||||
LIB: false,
|
||||
PDFJS_NEXT: false,
|
||||
};
|
||||
|
||||
|
@ -998,6 +999,7 @@ gulp.task('lib', ['buildnumber'], function () {
|
|||
saveComments: false,
|
||||
defines: builder.merge(DEFINES, {
|
||||
GENERIC: true,
|
||||
LIB: true,
|
||||
BUNDLE_VERSION: versionInfo.version,
|
||||
BUNDLE_BUILD: versionInfo.commit
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue