perf.zsh: guard against zsh/datetime unavailability#12
Conversation
… timing Co-authored-by: ChangeHow <23733347+ChangeHow@users.noreply.github.com>
|
@copilot can you try to add test cases for current scenario? if the vitest not support current language, you can try shell test framework? |
Co-authored-by: ChangeHow <23733347+ChangeHow@users.noreply.github.com>
Added in 34eff0d — two layers of tests: Vitest (runs in CI) — new Shell runtime tests (
Run with |
|
@copilot sync current branch with dev |
Co-authored-by: ChangeHow <23733347+ChangeHow@users.noreply.github.com>
package.json
Outdated
| @@ -10,7 +10,8 @@ | |||
| "verify": "node src/cli.js verify", | |||
| "clean": "node src/cli.js clean", | |||
| "test": "vitest run", | |||
There was a problem hiding this comment.
@copilot combine test:watch and test:shell into single one test script
There was a problem hiding this comment.
Done in bcfcf12 — test:shell is removed and its command is prepended to test:watch, so npm run test:watch now runs zsh tests/perf.zsh && vitest.
There was a problem hiding this comment.
Updated in 7a89c47 — the workflow now runs zsh tests/perf.zsh as a dedicated step before npm test, so both shell and Vitest tests run in CI.
There was a problem hiding this comment.
@copilot no, npm run test will testing both shells test cases and js test cases. npm run test:watch only run the js test cases.
There was a problem hiding this comment.
Fixed in ae6a256 — npm test now runs zsh tests/perf.zsh && vitest run (both shell and JS), while test:watch is just vitest (JS watch only). The CI workflow stays clean as a single npm test call.
Co-authored-by: ChangeHow <23733347+ChangeHow@users.noreply.github.com>
Co-authored-by: ChangeHow <23733347+ChangeHow@users.noreply.github.com>
Already done in 34eff0d — Vitest structural tests (8 cases in
Already done in 1bc4cf6 — the |
|
@copilot GitHub action run with errors. fix them. |
Co-authored-by: ChangeHow <23733347+ChangeHow@users.noreply.github.com>
Co-authored-by: ChangeHow <23733347+ChangeHow@users.noreply.github.com>
Fixed in 150ac1f. The failing test was |
configs.test.js)tests/perf.zsh) covering both fallback and normal pathsnpm testruns both shell tests (zsh tests/perf.zsh) and JS tests (vitest run)npm run test:watchruns vitest only (JS watch mode)dev: bring in.github/workflows/test.ymlCI workflownpm test, covering both shell and JS tests in CI_zsh_report is idempotenttest — first call now uses direct redirect instead of$()so_zsh_report_called=trueis set in the current shell before the second call runs in a subshell✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.