Using Vitest with Hono JSX // Error: Expression expected
Hi there,
I'm trying to add vitest to a hono project (I've not used vitest before) and am running into a problem...
The following code works fine in the browser -- hitting root on localhost shows a page with an H1 of "Hello world".
When I run
vitest run
, I get "Error: Expression expected".
Can anybody tell me what I'm doing wrong?
Fingers crossed and thanks for any help 🙂
2 Replies
I created a repo at https://github.com/scruffymongrel/hono-jsx-vitest-repro in case it helps make this easier to answer.
GitHub
GitHub - scruffymongrel/hono-jsx-vitest-repro
Contribute to scruffymongrel/hono-jsx-vitest-repro development by creating an account on GitHub.
This is now solved... the answer is to configure esbuild in the vitest.config.js: