Skip to content

Commit

Permalink
Try running vitest on github action.
Browse files Browse the repository at this point in the history
  • Loading branch information
gudaoxuri committed Sep 27, 2023
1 parent 7165c0f commit 25fe99b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Test
run: |
npm run test
- name: Build with VitePress
run: |
npm run docs:build
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"docs:dev": "vitepress dev docs --host 0.0.0.0",
"docs:build": "vitepress build docs",
"docs:serve": "vitepress serve docs",
"test": "vitest",
"test": "vitest --run",
"coverage": "vitest run --coverage"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion test/executor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('executor execute()', async () => {
try {
await execute(new Map(), "$.field.age", [], "$")
} catch (e) {
assert.equal(e.message, `公式执行错误: Cannot read properties of undefined (reading 'age')`)
assert.equal(e.message, `公式执行错误: Cannot read properties of undefined (reading 'age')err`)
}
})

Expand Down

0 comments on commit 25fe99b

Please sign in to comment.