standard.spec.js 501 B

123456789101112131415161718192021
  1. 'use strict'
  2. /* global describe, it, jsPDF, comparePdf, expect */
  3. /**
  4. * Standard spec tests
  5. */
  6. describe('Plugin: addhtml', () => {
  7. xit('should add HTML to the document', (done) => {
  8. document.body.innerHTML = '<h1>This is a test</h1>'
  9. const doc = new jsPDF('p','pt','a4')
  10. doc.addHTML(document.body,function() {
  11. setTimeout(() => {
  12. doc.output('datauri')
  13. comparePdf(doc.output('datauri'), 'html-output.pdf', 'addhtml')
  14. done()
  15. }, 1000)
  16. })
  17. })
  18. })