-
Notifications
You must be signed in to change notification settings - Fork 0
测试分支 #8
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
The head ref may contain hidden characters: "\u6D4B\u8BD5\u5206\u652F"
Merged
测试分支 #8
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
cea0cb7
Merge pull request #7 from ReasonW6/main
ReasonW6 0ed4a94
bug、性能优化
ReasonW6 3f7fe5e
feat: Introduce Vitest for unit testing and add initial tests for fro…
ReasonW6 2ce1fcc
feat: 添加 Vitest 测试框架及完整的单元和集成测试用例
ReasonW6 2c17592
Add Electron desktop reader and CI test coverage
ReasonW6 427bebb
feat: 增强书签存储功能,添加字体路径解析和安全性测试
ReasonW6 23516d4
feat: 优化路径解析,增加对同前缀兄弟目录的绝对路径拒绝逻辑,增强安全性
ReasonW6 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [18.x, 20.x] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run tests | ||
| run: npm test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // 最小化测试脚本 | ||
| console.log('process.type:', process.type); | ||
| console.log('process.versions.electron:', process.versions.electron); | ||
| const electron = require('electron'); | ||
| console.log('typeof electron:', typeof electron); | ||
| if (typeof electron === 'string') { | ||
| console.log('electron path:', electron); | ||
| } else { | ||
| console.log('keys:', Object.keys(electron)); | ||
| } | ||
| process.exit(0); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README 中给出了
npm run test:coverage的运行方式,但package.json的 scripts 里并没有test:coverage,会导致文档指引无法执行。建议补充对应脚本(例如vitest run --coverage)或移除/改写该段说明。