Yicong-Huang opened a new issue, #4863: URL: https://github.com/apache/texera/issues/4863
### Task Summary Land the Karma → Vitest runner switch and the bulk Jasmine → Vitest spec sweep so the rest of the migration steps under #4861 have a working test base to work from. Captured by PR #4862. ### Scope (in this step) - Replace the `test` Architect builder: `@angular-builders/custom-webpack:karma` → `@angular/build:unit-test` with `runner: vitest`. - Add `[email protected]` and `@vitest/coverage-v8`; remove `karma`, `karma-chrome-launcher`, `karma-coverage`, `karma-jasmine`, `jasmine-core`, `@types/jasmine`, `@types/karma-coverage`. - New configs: - `vitest.config.ts` — `globals: true` so existing Jasmine-style specs use bare `describe/it/expect` - `src/vitest-globals.d.ts` — triple-slash reference for `vitest/globals` types (workaround for parent tsconfig's pinned `typeRoots`) - `src/jsdom-svg-polyfill.ts` — stub `SVGSVGElement#createSVGMatrix` etc. so jointjs can instantiate under jsdom - `src/main.test.ts` — minimal entry that keeps the test bundle from pulling AppModule → every component - `src/tsconfig.test.json` — relaxes strict template type-checking for the test build only - Mechanical Jasmine → Vitest sweep over 73 spec files (~400 substitutions): matchers, `.and.*` chain, `jasmine.createSpy(Obj)`, `jasmine.SpyObj<T>` → `Mocked<T>`, `spyOn` → `vi.spyOn`, etc. - CI: switch frontend test invocation `--code-coverage` → `--coverage --coverage-reporters=lcovonly`. Codecov upload glob unchanged. - Stub two empty specs (`workflow-executions.service.spec.ts`, `joint-ui.service.spec.ts`) with `it.todo` placeholders so vitest discovery doesn't fail. ### Result ``` Test Files 14 passed | 2 skipped (16) Tests 109 passed | 2 todo (111) ``` ### Out of scope (other steps under #4861) The other ~57 specs need follow-ups tracked in their own sub-issues: - 43 component specs: NgModule → standalone migration - 13 service specs reaching the auth.service → modal chain - `drag-drop.service.spec.ts`: needs Vitest browser mode - `any` type tightening across spec files ### Tracking - Umbrella: #4861 - PR that closes this issue: #4862 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
