Skip to content

Commit

Permalink
Pass custom html to testtool
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Aug 29, 2024
1 parent ec82109 commit 7705642
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion bin/cm.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ function startServer() {
let runTests = require("@marijn/testtool")
let {browserTests} = runTests.gatherTests(buildPackages.map(p => p.dir))
resp.writeHead(200, {"content-type": "text/html"})
resp.end(runTests.testHTML(browserTests.map(f => path.relative(serve, f)), false))
resp.end(runTests.testHTML(browserTests.map(f => path.relative(serve, f)), {
html: `<title>CM6 view tests</title>
<h1>CM6 view tests</h1>
<div id="workspace" style="opacity: 0; position: fixed; top: 0; left: 0; width: 20em;"></div>`
}))
} else {
moduleserver.handleRequest(req, resp) || serveStatic(req, resp, _err => {
resp.statusCode = 404
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author": "Marijn Haverbeke <[email protected]>",
"license": "MIT",
"devDependencies": {
"@codemirror/buildhelper": "^1.0.0",
"@codemirror/buildhelper": "^1.0.2",
"esmoduleserve": "^0.2.0",
"serve-static": "^1.14.1",
"getdocs-ts": "^1.0.0",
Expand Down

0 comments on commit 7705642

Please sign in to comment.