Skip to content

Commit

Permalink
Add test & github action
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzoverardo committed Mar 3, 2024
1 parent d2f1121 commit 7f227a4
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Run Tests

on:
push:
branches:
- main

jobs:
run-tests:
name: Run Tests
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./tests

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test
File renamed without changes.
4 changes: 2 additions & 2 deletions test/package-lock.json → tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
10 changes: 10 additions & 0 deletions test/test/test.js → tests/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@ describe("Handle Headers", () => {
["Content-Type", "application/pdf"],
]
);
// test
testHandleHeaders(
"Google User Content",
"http://example.googleusercontent.com/test.pdf",
[
["Content-Disposition", "attachment"],
["Content-Type", "application/pdf"],
],
false
);
});

/* Helper Functions */
Expand Down

0 comments on commit 7f227a4

Please sign in to comment.