-
Notifications
You must be signed in to change notification settings - Fork 95
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
recipes list (wiki) #50
Comments
I have a solution to this list here nodejs/modules#47 and But I don't see any wiki page, that I can edit. |
https://github.com/lorenzofox3/zora-recipes is the place where I started (a long time ago: the readme is not relevant anymore) and updated some time ago. Note: there is actually now a test runner on top of zora for Nodejs which solves most of the problems. And I am currently working on a testing solution for the browser So far I am quite happy with both :) |
One idea for browser version tap consumer: We can combine themes in browsers from qunit test framework and tap producing test runner for browsers without any bundle. We just need to make a hook to console in browser and create div blocks with qunit semantics. I have a prototype in repo, but it’s far from complete solution. Main problem is to convert tap api to qunit template. |
@munrocket In that case, it is probably easier to use directly the message stream from zora discarding any tap reporter: you see an example here |
I like zora because it with ES6, fast and works in browser and node. But I don’t understand why I need zora-dev-server since I have puppeteer or you not sold it to me. I see only wall of text, raw sources without pictures and online examples 🤓 But it is possible to run tests in browsers and tests will be literally same for node and browsers with puppeteer magic without any javascript bundlers. Look at this real example: https://munrocket.github.io/gl-bench/test/unit-test.html Only one problem here: it looks like console output. If somebody will create new TAP consumer for browsers which one connect rich QUnit themes world and TAP producing test frameworks, this will be ultimate solution. Am I right or I miss something? |
zora-dev-server is actually intended to be used with tools such puppeteer (at least for automation and continuous integration). It is still a work in progress and I am not trying to sell it to you (yet). Hence the documentation is vastly incomplete. You can definitely use zora, decide to serve your test files the way you want (from html, using karma, cdn(s), codpen, etc), bundle/compile if that is needed. That is what zora is made for: give you the chance to build you own testing experience based on your actual needs. Why would one want to use zora dev server ?:
import foo from 'my-module'; //not an url, I don't care and do not want to care where it is in the filesystem
// do something And the browser won't be able to run that file. So they use a bundler on top of it, which need to be configured, slow down the whole process, etc. zora-dev-server serve your files and resolve the dependencies' urls on the fly so you don't have that trouble. Your solution is very good and I am very happy you use zora this way, but it would only work for simple projects. zora-dev-server aims at solving problems and ease the development of larger projects |
added support for zora in https://github.com/hugomrdias/playwright-test |
It looks very nice @hugomrdias. I'll check it out and maybe add it to the readme ! |
Thanks for publishing a Node TS example for Zora! I liked zora/pta as a runner but wanted automatic reloading on file changes without spawning new processes. Also wanted avoid tsc and tsc in a watch loop since I use esbuild. Here's Zora working in pure TS with Wait a minute before testing it. This fix is being merged and published right now: antfu/esbuild-node-loader#3 |
The text was updated successfully, but these errors were encountered: