Closed Golmote closed 4 years ago
the whole library is tested via basicHTML
https://github.com/WebReflection/hyperHTML/blob/master/test/test.js and I've just tried this on top:
const root = document.createElement('div');
const cls = 'foo';
console.log(hyperHTML(root)`<div class="foo"></div>` === root);
console.log(hyperHTML(root)`<div class=${cls}></div>` === root);
it works without issues.
After more digging, TIL that Jest runs the tests in a jsdom environment by default...
So if anyone runs into this issue, the fix seems to be setting Jest's testEnvironment
to "node"
.
Thank you for your time!
Hello,
I'm encountering an error that seems quite similar to the one described in #190, except I'm using basichtml.
Below is the Minimal, Reproducible Example I could come up with. Am I doing something wrong that I can't see?
(I run that test using Jest. hyperhtml and basichtml are both in their latest versions, 2.32.2 and 2.3.0, respectively.)