Skip to content

Commit

Permalink
ci: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Jul 23, 2024
1 parent 36050bf commit e73d8ca
Show file tree
Hide file tree
Showing 15 changed files with 1,245,289 additions and 1,297 deletions.
18 changes: 10 additions & 8 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
const [nodeMajor] = process.versions.node.split(".").map(Number);
const isNodeSassSupported = require("./test/helpers/is-node-sass-supported");

module.exports = {
testEnvironment: "jest-environment-node-single-context",
moduleNameMapper:
nodeMajor > 20
? {
// For Node.js@22, because `node-sass` doesn't support it
"^node-sass$": "sass",
}
: {},
// eslint-disable-next-line no-undefined
snapshotResolver:
"<rootDir>/test/helpers/skip-node-sass-snapshot-resolver.js",
moduleNameMapper: isNodeSassSupported()
? {}
: {
// For Node.js@22, because `node-sass` doesn't support it
"^node-sass$": "sass",
},
};
Loading

0 comments on commit e73d8ca

Please sign in to comment.