Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests #46

Merged
merged 27 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Unit tests

on:
push:
branches: [main, master, next]
pull_request:
workflow_dispatch:

jobs:
run-tests:
name: Run unit tests
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Check out repo
uses: actions/checkout@v3

- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 18

- run: npm ci
- run: npm run build

- name: Run tests
run: npm run test:unit
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ wiki-wishlist
.editorconfig
.idea
/dist
/tests/fixtures/dist
/tests/reports
/tests/results
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ a selector of `link[rel=stylesheet], script[src], style`.
```javascript
new SwupHeadPlugin({
persistAssets: true
})
});
```

### persistTags
Expand All @@ -77,7 +77,7 @@ new SwupHeadPlugin({

// Use a function to determine whether to keep a tag
persistTags: (tag) => tag.children.length > 1
})
});
```

### awaitAssets
Expand All @@ -89,5 +89,5 @@ Defaults to `false`.
```javascript
new SwupHeadPlugin({
awaitAssets: true
})
});
```
Loading
Loading