Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

test(renderers/angular): add vitest browser testing #410

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

Open
43081j wants to merge 2 commits into google:main
base: main
Choose a base branch
Loading
from 43081j:angular-tests

Conversation

@43081j
Copy link

@43081j 43081j commented Dec 30, 2025
edited
Loading

There's no real test setup in the angular renderer project yet.

I was roaming around the codebase and figured I'd push this PR. It has the following:

  • Drop karma/jasmine
  • Switch to build:unit-test
  • Use chromium so component tests run in a real browser
  • Add missing rxjs dependency
  • add 2 basic test files

Note i haven't touched angular in a long time, so a bunch of the tests may not be best practice. If there are better ways to do any of this, do let me know so i can update and learn.

It seems like we should also have some shared test utils file somewhere for things like the mock theme. Where would be sensible to put that?

Similarly, this waitForSelector function is a shame. I needed it because the default catalog uses dynamic imports and whenStable isn't aware of these. whenStable completes long before the dynamic import, but i can't seem to find anything built-in we can wait for other than polling for the DOM.

If you planned on having a different test setup, feel free to throw this PR away! It has been good to learn the codebase either way.

@43081j 43081j changed the title (削除) test(renderers): add vitest browser testing (削除ここまで) (追記) test(renderers/angular): add vitest browser testing (追記ここまで) Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /