Fixed pdf tests
This commit is contained in:
parent
c89742b1be
commit
a88a8a08c2
2 changed files with 3 additions and 3 deletions
|
@ -1,11 +1,11 @@
|
|||
import Vue from 'vue';
|
||||
import { PDFJS } from 'vendor/pdf';
|
||||
import { GlobalWorkerOptions } from 'vendor/pdf';
|
||||
import workerSrc from 'vendor/pdf.worker.min';
|
||||
|
||||
import PDFLab from '~/pdf/index.vue';
|
||||
import pdf from '../fixtures/blob/pdf/test.pdf';
|
||||
|
||||
PDFJS.workerSrc = workerSrc;
|
||||
GlobalWorkerOptions.workerSrc = workerSrc;
|
||||
const Component = Vue.extend(PDFLab);
|
||||
|
||||
describe('PDF component', () => {
|
||||
|
|
|
@ -12,7 +12,7 @@ describe('Page component', () => {
|
|||
let testPage;
|
||||
|
||||
beforeEach(done => {
|
||||
pdfjsLib.PDFJS.workerSrc = workerSrc;
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = workerSrc;
|
||||
pdfjsLib
|
||||
.getDocument(testPDF)
|
||||
.then(pdf => pdf.getPage(1))
|
||||
|
|
Loading…
Reference in a new issue