Skip to content

Commit

Permalink
Updating packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecousins committed Jun 19, 2019
1 parent acc5b8c commit 97f1f07
Show file tree
Hide file tree
Showing 3 changed files with 726 additions and 92 deletions.
18 changes: 9 additions & 9 deletions package.json
Expand Up @@ -33,18 +33,18 @@
"trailingComma": "es5"
},
"devDependencies": {
"@types/jest": "24.0.13",
"@types/react": "16.8.18",
"@types/jest": "24.0.15",
"@types/react": "16.8.20",
"@types/react-dom": "16.8.4",
"husky": "2.3.0",
"prettier": "1.17.1",
"pretty-quick": "1.11.0",
"husky": "2.4.1",
"prettier": "1.18.2",
"pretty-quick": "1.11.1",
"react": "16.8.6",
"react-dom": "16.8.6",
"tsdx": "0.5.11",
"tslib": "1.9.3",
"typescript": "3.4.5",
"webpack": "4.32.1"
"tsdx": "0.7.2",
"tslib": "1.10.0",
"typescript": "3.5.2",
"webpack": "4.34.0"
},
"dependencies": {
"@bundled-es-modules/pdfjs-dist": "2.1.266-rc"
Expand Down
13 changes: 10 additions & 3 deletions test/index.test.tsx
@@ -1,12 +1,19 @@
import React from 'react';
import React, { useRef } from 'react';
import { render, unmountComponentAtNode } from 'react-dom';

import Pdf from '../src';
import { usePdf } from '../src/index';

describe('Pdf', () => {
it('renders without crashing', () => {
const div = document.createElement('div');
render(<Pdf file="test.pdf" />, div);
const canvasEl = useRef(null);

usePdf({
file: 'basic.33e35a62.pdf',
page: 1,
canvasEl,
});
render(<canvas ref={canvasEl} />, div);
unmountComponentAtNode(div);
});
});

0 comments on commit 97f1f07

Please sign in to comment.