-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathweb-test-runner.config.mjs
48 lines (43 loc) · 1.25 KB
/
web-test-runner.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import {
chromeLauncher,
summaryReporter,
defaultReporter,
} from "@web/test-runner";
import { exec } from "child_process";
import failOnly from "./test/lib/fail-only.mjs";
let config = {
testRunnerHtml: (testFramework) => `
<!DOCTYPE html>
<html>
<head>
<script src="/node_modules/chai/chai.js"></script>
<script src="/node_modules/chai-dom/chai-dom.js"></script>
<script>should = chai.should();</script>
<script src="/test/lib/utilities.js"></script>
<script src="/test/lib/wait-for.js"></script>
<script src="/node_modules/sinon/pkg/sinon.js"></script>
<script src="/src/idiomorph.js"></script>
<script src="/node_modules/htmx.org/dist/htmx.js"></script>
<script src="/src/idiomorph-htmx.js"></script>
<script src="/test/lib/morphdom.js"></script>
<script type="module" src="${testFramework}"></script>
</head>
<body>
<em>Work Area</em>
<hr/>
<pre id="work-area" hx-ext="morph">
Output Here...
</pre>
</body>
</html>
`,
nodeResolve: true,
coverage: true,
coverageConfig: {
include: ["src/**/*"],
},
files: "test/*.js",
plugins: [failOnly],
reporters: [summaryReporter(), defaultReporter()],
};
export default config;