Skip to content

Commit 90eb6b7

Browse files
Fix tests
1 parent d0786d0 commit 90eb6b7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

test/testHtmlParser.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ global.TextEncoder = require('util').TextEncoder
33
global.TextDecoder = require('util').TextDecoder
44

55
import { jsPDF } from 'jspdf'
6+
import { applyPlugin } from '../src/applyPlugin'
67
import { DocHandler } from '../src/documentHandler'
78
import { parseHtml } from '../src/htmlParser'
89
const assert = require('assert')
910
const jsdom = require('jsdom')
1011
const dom = new jsdom.JSDOM('')
1112

13+
applyPlugin(jsPDF)
14+
1215
describe('html parser', () => {
1316
it('full table', () => {
1417
const doc = new DocHandler(new jsPDF())

test/testRunning.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { jsPDF } from 'jspdf'
2-
import autoTable, { autoTableInstanceType } from '../src/main'
2+
import autoTable, { applyPlugin, autoTableInstanceType } from '../src/main'
33
const assert = require('assert')
44

5+
applyPlugin(jsPDF)
6+
57
describe('runner', () => {
68
it('prototype', () => {
79
const doc: any = new jsPDF()
@@ -37,6 +39,7 @@ describe('runner', () => {
3739
})
3840

3941
it('previous typing', () => {
42+
applyPlugin(jsPDF)
4043
const doc = new jsPDF()
4144
;((doc as any).autoTable as autoTableInstanceType)({ body: [['test']] })
4245
assert(true)

0 commit comments

Comments
 (0)