Skip to content

Commit

Permalink
test: use linkedom to test web component functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisburnell committed Aug 8, 2024
1 parent c33f19a commit be316de
Show file tree
Hide file tree
Showing 6 changed files with 396 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm install
- run: npm ci
- run: node --test
- if: ${{ github.event.release.tag_name != '' && env.NPM_PUBLISH_TAG != '' }}
run: npm publish --provenance --access=public --tag=${{ env.NPM_PUBLISH_TAG }}
env:
Expand Down
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
.eslintrc.json
.prettierrc
.prettierignore
svg-sparkline.test.js
assets
demo.html
demo.html
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"tabWidth": 4
"tabWidth": 4,
"trailingComma": "all"
}
203 changes: 203 additions & 0 deletions package-lock.json

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

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,18 @@
},
"main": "svg-sparkline.js",
"scripts": {
"start": "npx http-server ."
"start": "npx http-server .",
"test": "node --test"
},
"keywords": [
"component",
"components",
"custom elements",
"web",
"web components"
]
],
"devDependencies": {
"linkedom": "^0.18.4"
},
"type": "module"
}
Loading

0 comments on commit be316de

Please sign in to comment.