Hi!
I’m testing a function in a UI template and keep getting Error: Cannot find module './template.html'
while trying to run.
In my test file, I import the template’s JS simply by `import { foo } from ‘PATH/template.js’. Where template.js’s first line is to import its .html.
From what I’ve read https://github.com/meteor/meteor/issues/7169 . The issue is that .html isn’t compiled on the server. That post’s solution is to wrap the test’s import statement inside a
Metero.isClient
. But, I’m finding that now my test suite (meteortesting:mocha) doesn’t find the test.
Now I’m confused, the tests exist on the server, but the testing framework is technically a client running the code, right? Any workarounds for this?
Thanks!