Skip to content

Commit 04442e2

Browse files
committed
refactor: simplify web-test-runner configuration
- Removed TypeScript type annotations and unnecessary HTML template from the web-test-runner configuration file for improved readability.
1 parent 8215c8e commit 04442e2

File tree

1 file changed

+13
-26
lines changed

1 file changed

+13
-26
lines changed

web-test-runner.config.mjs

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
1-
/** @typedef {import('@web/test-runner').TestRunnerConfig} TestRunnerConfig */
2-
3-
export default /** @type TestRunnerConfig */ ({
4-
files: 'test/**/*.test.js',
5-
nodeResolve: true,
6-
middleware: [
7-
function rewriteBase(context, next) {
8-
if (context.url.indexOf('/base') === 0) {
9-
context.url = context.url.replace('/base', '');
10-
}
11-
return next();
12-
}
13-
],
14-
testFramework: {
15-
config: {
16-
timeout: 10000,
17-
},
18-
},
19-
testRunnerHtml: (testFramework) =>
20-
`<html>
21-
<body>
22-
<script src="../demo/vendor.js"></script>
23-
<script type="module" src="${testFramework}"></script>
24-
</body>
25-
</html>`
26-
});
1+
export default {
2+
files: 'test/**/*.test.js',
3+
nodeResolve: true,
4+
middleware: [
5+
function rewriteBase(context, next) {
6+
if (context.url.indexOf('/base') === 0) {
7+
context.url = context.url.replace('/base', '');
8+
}
9+
return next();
10+
}
11+
],
12+
};
13+

0 commit comments

Comments
 (0)