Skip to content

Commit 6c3a792

Browse files
committed
Refactor CI workflow and update documentation for clarity
- Removed the webview test step from the CI configuration to streamline the testing process. - Updated the ARCHITECTURE.md to reflect changes in the CI process and added details about webview protocol tests. - Introduced a new test for the formatCompactNumber function in quotaRules.test.ts to enhance test coverage.
1 parent 3d90e10 commit 6c3a792

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,3 @@ jobs:
5454

5555
- name: Test extension
5656
run: pnpm test
57-
58-
- name: Test webview
59-
run: pnpm --dir webview test

docs/ARCHITECTURE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,9 @@ Enabled only for the **active window’s profile**; secrets live in that window
229229
- **Runner:** Node.js `node:test` on compiled `out/test/**/*.test.js`
230230
- **Mocks:** `src/test/registerVscodeMock.ts` for `vscode` module
231231
- **Fixtures:** process output samples under `src/test/fixtures/`
232-
- **CI:** `pnpm test`, `pnpm run test:types-sync`, `pnpm --dir webview test`, ESLint layer rules
232+
- **CI:** `pnpm test`, `pnpm run test:types-sync`, ESLint layer rules
233233
- **Canonical quota rule tests:** `src/test/domain/quotaRules.test.ts` (imports `@cursor-accounts/types` directly)
234+
- **Webview protocol tests:** `src/test/accountsPanel.test.ts` (extension-side webview messaging and HTML setup)
234235

235236
## Known maintainability notes
236237

src/test/domain/quotaRules.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { describe, it } from 'node:test';
22
import assert from 'node:assert/strict';
33
import {
4+
formatCompactNumber,
45
getEffectiveUsagePercent,
56
getPersonalModeAveragePercent,
67
getQuotaStatus,
@@ -164,4 +165,11 @@ describe('domain quota rules', () => {
164165
);
165166
});
166167
});
168+
169+
describe('formatCompactNumber', () => {
170+
it('formats compact numbers', () => {
171+
assert.equal(formatCompactNumber(456728), '457k');
172+
assert.equal(formatCompactNumber(0), '0');
173+
});
174+
});
167175
});

0 commit comments

Comments
 (0)