Skip to content

Commit

Permalink
Merge pull request #19 from mblink/local-web-server
Browse files Browse the repository at this point in the history
setup local dev server, incorporate playwright e2e testing
  • Loading branch information
SuttonKyle authored Mar 25, 2024
2 parents 467b866 + 827369b commit 6bbcf04
Show file tree
Hide file tree
Showing 18 changed files with 2,457 additions and 4,803 deletions.
384 changes: 194 additions & 190 deletions .eslintrc.js

Large diffs are not rendered by default.

17 changes: 14 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,26 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'

- name: Install Node.js dependencies
run: npm ci

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name : Run test
run: npm run prepublishOnly
run: npm run prepublishOnly

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ build/
dist/

.git/
.vscode/
.vscode/

.DS_Store
test-results/
playwright-report/
blob-report/
playwright/.cache/
2 changes: 1 addition & 1 deletion example/example.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { init } from '../dist/es2015';

init('../node_modules/pdfjs-dist/build/pdf.worker.min.js');
init('http://localhost:8080/pdf.worker.min.js');
2 changes: 1 addition & 1 deletion example/viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</head>
<body>
<div class="viewer-container" id="doc-1" data-document-url="https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf"></div>
<div class="viewer-container" id="doc-2" data-document-url="https://www.w3.org/TR/PNG/iso_8859-1.txt"></div>
<div class="viewer-container" id="doc-2" data-document-url="https://example-files.online-convert.com/document/txt/example.txt"></div>
<div class="viewer-container" id="doc-3" data-document-url="http://ieee802.org:80/secmail/docIZSEwEqHFr.doc"></div>
<div class="viewer-container" id="doc-4"></div>
</body>
Expand Down
5 changes: 0 additions & 5 deletions jest.config.js

This file was deleted.

Loading

0 comments on commit 6bbcf04

Please sign in to comment.