Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed May 8, 2024
1 parent fac9d98 commit c8c5786
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions web-test-runner.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ export default {
coverageConfig: {
reportDir: "./reports",
},
plugins: [
{
name: "css-modules",
async transform(context) {
const url = new URL(`.${context.request.url}`, import.meta.url);

if (url.href.endsWith("module.css")) {
return {
body: "export default {};",
headers: {
"Content-Type": "text/javascript",
},
};
}
},
},
],
middleware: [
function rewriteIndex(context, next) {
const { url } = context.request;
Expand Down

0 comments on commit c8c5786

Please sign in to comment.