Skip to content

Commit

Permalink
fix: added test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
kouts committed Jan 11, 2022
1 parent e63c923 commit fe52931
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 86 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x
- name: Install dependencies
run: npx ci
- name: Install sematic-release extra plugins
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Lint
run: npm run lint-fix
- name: Test
run: npm run test:unit --if-present
run: npm run test:unit-coverage --if-present
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# vue-path-store <a href="https://npm.im/vue-path-store"><img src="https://badgen.net/npm/v/vue-path-store"></a> ![](https://img.badgesize.io/kouts/vue-path-store/main/dist/umd/pathStore.min.js.svg) ![](https://img.badgesize.io/kouts/vue-path-store/main/dist/umd/pathStore.min.js.svg?compression=gzip)
# vue-path-store <a href="https://npm.im/vue-path-store"><img src="https://badgen.net/npm/v/vue-path-store"></a> ![](https://img.badgesize.io/kouts/vue-path-store/main/dist/umd/pathStore.min.js.svg) ![](https://img.badgesize.io/kouts/vue-path-store/main/dist/umd/pathStore.min.js.svg?compression=gzip) ![](coverage/badge.svg)

**PathStore** is a simple, lightweight, **shared** state management solution for Vue.
At its heart lays a simple reactive store, which uses the dot notation path syntax for data mutation.
Expand Down
1 change: 1 addition & 0 deletions coverage/badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions coverage/coverage-summary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{"total": {"lines":{"total":45,"covered":45,"skipped":0,"pct":100},"statements":{"total":46,"covered":46,"skipped":0,"pct":100},"functions":{"total":22,"covered":22,"skipped":0,"pct":100},"branches":{"total":12,"covered":12,"skipped":0,"pct":100}}
,"/var/www/vue-path-store/src/constants.js": {"lines":{"total":1,"covered":1,"skipped":0,"pct":100},"functions":{"total":0,"covered":0,"skipped":0,"pct":100},"statements":{"total":1,"covered":1,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
,"/var/www/vue-path-store/src/methods.js": {"lines":{"total":12,"covered":12,"skipped":0,"pct":100},"functions":{"total":7,"covered":7,"skipped":0,"pct":100},"statements":{"total":12,"covered":12,"skipped":0,"pct":100},"branches":{"total":4,"covered":4,"skipped":0,"pct":100}}
,"/var/www/vue-path-store/src/pathStore.js": {"lines":{"total":1,"covered":1,"skipped":0,"pct":100},"functions":{"total":1,"covered":1,"skipped":0,"pct":100},"statements":{"total":2,"covered":2,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
,"/var/www/vue-path-store/src/pathStorePiniaPlugin.js": {"lines":{"total":2,"covered":2,"skipped":0,"pct":100},"functions":{"total":1,"covered":1,"skipped":0,"pct":100},"statements":{"total":2,"covered":2,"skipped":0,"pct":100},"branches":{"total":2,"covered":2,"skipped":0,"pct":100}}
,"/var/www/vue-path-store/src/pathStoreVuexPlugin.js": {"lines":{"total":29,"covered":29,"skipped":0,"pct":100},"functions":{"total":13,"covered":13,"skipped":0,"pct":100},"statements":{"total":29,"covered":29,"skipped":0,"pct":100},"branches":{"total":6,"covered":6,"skipped":0,"pct":100}}
}
7 changes: 7 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
<img src="vue-path-store.png" alt="Vue PathStore" width="420" />
</div>

<div class="text-center mb-3">
<a href="https://npm.im/vue-path-store"><img src="https://badgen.net/npm/v/vue-path-store"></a>
<img src="https://img.badgesize.io/kouts/vue-path-store/main/dist/umd/pathStore.min.js.svg" />
<img src="https://img.badgesize.io/kouts/vue-path-store/main/dist/umd/pathStore.min.js.svg?compression=gzip" />
<img src="../coverage/badge.svg" />
</div>

**PathStore** is a simple, lightweight, **shared** state management solution for Vue.
At its heart lays a simple reactive store, which uses the dot notation path syntax for data mutation.

Expand Down
4 changes: 3 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {
preset: '@vue/cli-plugin-unit-jest',
transformIgnorePatterns: ['/node_modules/(?!(vue-set-path)/)']
transformIgnorePatterns: ['/node_modules/(?!(vue-set-path)/)'],
coveragePathIgnorePatterns: ['/node_modules/', '/tests/'],
coverageReporters: ['text', 'json-summary']
}
148 changes: 67 additions & 81 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"serve": "vue-cli-service serve",
"build:vue": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
"test:unit-coverage": "vue-cli-service test:unit --coverage && make-coverage-badge",
"watch": "vuepress dev docs",
"rollup": "rollup -c",
"docs:dev": "vuepress dev docs",
Expand Down Expand Up @@ -61,6 +62,7 @@
"eslint-plugin-vue": "^7.9.0",
"husky": "^6.0.0",
"lint-staged": "^11.0.0",
"make-coverage-badge": "^1.2.0",
"node-sass": "^4.14.1",
"pinia": "^0.5.1",
"prettier": "2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
[
'@semantic-release/git',
{
assets: ['CHANGELOG.md'],
assets: ['CHANGELOG.md', 'dist', 'coverage'],
// eslint-disable-next-line no-template-curly-in-string
message: 'chore(release): set `package.json` to ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
}
Expand Down

0 comments on commit fe52931

Please sign in to comment.