-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to use zora with Deno? #77
Comments
Hello. To be honest I don't know: https://raw.githubusercontent.com/lorenzofox3/zora/master/src/reporter.ts exists, so it might be a bug in Deno's loader. Maybe you can try by using this bundle file URL. Perhaps @bdchauvette can help you. He is the only Deno's user I am aware of |
You have to use the bundle URL and you won't be able to use any TS interfaces because the declarations use node-style path imports. Here's a minimal example. The reason you have to use the bundle is that it's pretty much impossible to write TS sources that are compatible with both Deno and The reason the declarations don't work is again related to Deno's requirement that imports need to match the exact file name. The Zora typings are not bundled and they use Node-style extensionless paths. So even if you add a // @deno-types="https://unpkg.com/zora@4.0.1/dist/declarations/index.d.ts"
import { test } from 'https://unpkg.com/zora@4.0.1/dist/bundle/module.js'; In my case, I'm writing a cross-runtime lib, so I'm writing the tests with Node-style imports, then bundling everything together (with some changes based on target runtime) into tmp files, then running Node, Deno, QuickJS, etc. against the temp files. The only runtime support that I was missing from Zora was the ability to read env vars from the If you're only supporting Deno, you should probably use Deno's builtin test framework or something like Rhum that targets Deno exclusively. @lorenzofox3 -- Sorry for adding some maintenance overhead here 😓 I'm actually probably going to end up writing my own testing framework (no issue with Zora, I just prefer Mocha/Jest bdd-style structure for tests), so it might be simpler to revert #73 to avoid any confusion about Deno support 😬 |
Thanks for your thorough feedback @bdchauvette 👍 I'll close this one for now |
Doing an
gives this error:
The text was updated successfully, but these errors were encountered: