Open rictic opened 4 years ago
If the amount of tests you need to write for this are somewhat manageable, you could also write tests without a test framework. You just need to set up some boilerplate to ping back results to the test runner.
You can write them in JS, but that requires running a separate test runner instance. If you write a HTML test, you can set this up within the current test runner. See an example here at the bottom of the page.
You may also be able to bypass the this issue by not using the HTML reporter in mocha.
Ideally we'd run all of our tests both with and without trusted types enabled.
Running without the HTML reporter would work I bet. The only other place that needed changing was some bit of code highlighting.
@rictic how is this looking? Looks like you got a ping on https://github.com/mochajs/mocha/pull/4447
@rictic can we close this out?
In order to add Trusted Types support to lit next we need to be able to test it, and it looks like our current test setup has issues.
We're using @web/test-runner with @web/test-runner-mocha, which depends on mocha, which does some
.innerHTML
assignment. I sent over https://github.com/mochajs/mocha/pull/4447 to fix.Patching that in, I think that's all that we need here. If that change doesn't get reviewed in a timely fashion though, we can look into alternatives like jasmine.