Headless/Vite: @srhazi/gooey-test/vite plugin + optional vite peer (#2) #14
Loading…
Reference in a new issue
No description provided.
Delete branch "wip/issue-02"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a Vite integration so hosted + headless modes "just work", per #2.
Changes
@srhazi/gooey-test/viteplugin: serves the built testrunner at a stable path (/@gooey-test/testrunner.html), discovers test files, injects them aswindow.__gooeyTest.files, exposesvirtual:gooey-test/manifest, and appends the runner dir toserver.fs.allow.vitedeclared as an optional peerDependency (kept as a devDependency);./vitesubpath export;s/dist+tsconfig.vite.jsonbuild it.#/...flow if unavailable.src/testrunner/testrunner.tsxreads the injected file list (hash still wins for back-compat).define-global regression guard.Verification
#/...fallback pass;base: '/app/'passes../s/smoke: green (incl. hosted entry + the define guard).Note
Serving the sandbox iframe HTML through Vite's pipeline was required so Vite's
defineglobals (e.g.TEST) reach test modules loaded in the sandbox iframes.Closes #2
Superseded by #23, which contains this change plus a simplification pass and is now based directly on
main.Closing this in favour of #23 so the simplified implementation is what lands. Summary of the simplification is in #23's description.
Pull request closed