Repository navigation
Conversation
Migrate @firebase/auth-compat unit tests from legacy Karma/Mocha/Chai/Sinon to native Vitest with Playwright Chromium browser runner and Node runner.
- Replace karma.conf.js with vitest.config.mjs extending config/vitest.base.mjs
- Add transform plugin in vitest.config.mjs to provide AuthErrorCode and AuthEventType const enum exports for Vitest runtime
- Update package.json test scripts to use vitest run
- Migrate auth.test.ts and popup_redirect.test.ts to native Vitest assertions, spies, and mocks with vi.mock('./platform', { spy: true })
- Move fake controller providers to test/helpers/fake_providers.ts to decouple unit tests from integration settings
- Configure tsconfigOverride in rollup.config.js to exclude test files from bundle packaging
- Add standard mock cleanup in test/setup.ts and ambient types via test/types/vitest-globals.d.ts
|
There was a problem hiding this comment.
Code Review
This pull request migrates the auth-compat package's test suite from Karma, Mocha, and Sinon to Vitest, updating the package scripts, test files, and configurations accordingly. The feedback highlights a critical issue in the custom Vitest plugin where a loose path-matching condition could cause compilation failures if the repository is cloned into a directory containing 'internal'. Additionally, a redundant property assignment was identified in auth.test.ts just prior to using Object.defineProperty.
…re/vitest-auth-compat
e85d518 to
34e95aa
Compare
…re/vitest-auth-compat
…mplate-chat-session
Vertex AI Mock Responses Check
|
…ebug token storage in app-check
… and revert unrelated files
c65dab8 to
862c763
Compare
Migrate @firebase/auth-compat unit tests from legacy Karma/Mocha/Chai/Sinon to native Vitest with Playwright Chromium browser runner and Node runner.