Skip to content

Conversation

@43081j
Copy link

@43081j 43081j commented Dec 30, 2025

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant