Skip to content

Commit 024e68f

Browse files
committed
fix: collectCoverage warning in unit tests and Dart Sass deprecation in build
1 parent da029a7 commit 024e68f

3 files changed

Lines changed: 102 additions & 55 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
"typescript": ">5.8.0"
8787
},
8888
"patchedDependencies": {
89+
"@mendix/pluggable-widgets-tools": "patches/@mendix__pluggable-widgets-tools.patch",
8990
"mime-types": "patches/mime-types.patch",
9091
"mobx-react-lite@4.0.7": "patches/mobx-react-lite@4.0.7.patch",
9192
"mobx@6.12.3": "patches/mobx@6.12.3.patch",
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
diff --git a/configs/rollup.config.mjs b/configs/rollup.config.mjs
2+
index b6201dbff88ca2e2ee2f67a244d7e6bb2423c132..de93dcf662e9a52e3186ee38d0405e4dfb6ccf1f 100644
3+
--- a/configs/rollup.config.mjs
4+
+++ b/configs/rollup.config.mjs
5+
@@ -158,7 +158,11 @@ export default async args => {
6+
minimize: production,
7+
plugins: [postcssImport(), postcssUrl({ url: "inline" })],
8+
sourceMap: !production ? "inline" : false,
9+
- use: ["sass"]
10+
+ use: {
11+
+ sass: {
12+
+ silenceDeprecations: ['legacy-js-api'],
13+
+ }
14+
+ },
15+
}),
16+
...getCommonPlugins({
17+
sourceMaps: !production,
18+
@@ -354,7 +358,11 @@ export function postCssPlugin(outputFormat, production, postcssPlugins = []) {
19+
...postcssPlugins
20+
],
21+
sourceMap: !production ? "inline" : false,
22+
- use: ["sass"],
23+
+ use: {
24+
+ sass: {
25+
+ silenceDeprecations: ['legacy-js-api'],
26+
+ }
27+
+ },
28+
to: join(outDir, `${outWidgetFile}.css`)
29+
});
30+
}
31+
diff --git a/test-config/jest.config.js b/test-config/jest.config.js
32+
index 3df733c122ed816ef62f701559362baef1936dbe..9dab9730eafb1fe1e3efe4db84ff6a8833c3811f 100644
33+
--- a/test-config/jest.config.js
34+
+++ b/test-config/jest.config.js
35+
@@ -26,7 +26,7 @@ module.exports = {
36+
"react-hot-loader/root": join(__dirname, "__mocks__/hot")
37+
},
38+
moduleDirectories: ["node_modules", join(projectDir, "node_modules")],
39+
- collectCoverage: !process.env.CI,
40+
+ // collectCoverage: !process.env.CI,
41+
coverageDirectory: join(projectDir, "dist/coverage"),
42+
testEnvironment: "jsdom"
43+
};

0 commit comments

Comments
 (0)