Debian Codegraph @

test/web-test-runner.config.mjs

raw symbols SCIP
1 import {
2 summaryReporter,
3 defaultReporter
4 } from '@web/test-runner'
5
6 const config = {
7 testRunnerHtml: (testFramework) => `
8 <html lang="en">
9 <head>
10 <meta charset="utf-8" />
11 <title>htmx Tests</title>
12 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
13 <meta name="htmx-config" content='{"logAll":false}'>
14 </head>
15 <body>
16
17 <h2>Htmx Test Suite</h2>
18
19 <script src="https://unpkg.com/[email protected]/chai.js"></script>
20 <script src="test/lib/fetch-mock.js"></script>
21 <script src="src/htmx.js"></script>
22
23 <script class="mocha-init">
24 window.should = window.chai.should()
25 window.assert = window.chai.assert
26 </script>
27
28 <script src="test/lib/helpers.js"></script>
29 <script type="module" src="${testFramework}"></script>
30
31 <div id="test-playground"></div>
32
33 </body>
34 </html>`,
35
36 nodeResolve: true,
37 coverage: true,
38 coverageConfig: {
39 include: ['src/htmx.js']
40 },
41 files: [
42 'test/tests/**/*.js'
43 ],
44 reporters: [summaryReporter({ flatten: false, reportTestLogs: false, reportTestErrors: true }), defaultReporter({ reportTestProgress: true, reportTestResults: true })]
45 }
46
47 export default config