oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.4k stars 2.78k forks source link

Support Angular component testing with HTML file templates #15240

Open NateRadebaugh opened 6 days ago

NateRadebaugh commented 6 days ago

What version of Bun is running?

No response

What platform is your computer?

No response

What steps can reproduce the bug?

  1. Clone repo, bun install

    https://github.com/sp90/treaty

  2. Run bun test. Everything works and tests pass
  3. Move template HTML in post.component.ts to post.component HTML and update template URL to "./post.component.html"
  4. Run bun test

    Did you run and wait for 'resolveComponentResources()'?

What is the expected behavior?

Expected: should work and tests pass

What do you see instead?

Actual: exception is thrown initialize component for testing

Did you run and wait for 'resolveComponentResources()'?

Additional information

I understand theoretically this may need a custom bun plugin to integrate with the Angular parser.

Prior art: