Skip to content

Commit 2d0f1ad

Browse files
committed
feat: add config option to stop warning
1 parent 5a1693d commit 2d0f1ad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/process.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ module.exports = function (src, filePath, jestConfig) {
6262
}
6363

6464
const map = generateSourceMap(script, '', filePath, scriptSrc, inputMap)
65+
6566
let output = ';(function(){\n' + script + '\n})()\n' +
6667
'var defaultExport = (module.exports.__esModule) ? module.exports.default : module.exports;' +
6768
'var __vue__options__ = (typeof defaultExport === "function"' +
@@ -86,7 +87,7 @@ module.exports = function (src, filePath, jestConfig) {
8687

8788
if (Array.isArray(parts.styles) && parts.styles.length > 0) {
8889
if ((parts.styles.some(ast => /^scss|sass|less|pcss|postcss/.test(ast.lang))) && logger.shouldLogStyleWarn) {
89-
logger.warn('Sass, Less and PostCSS are not currently compiled by vue-jest')
90+
!config.hideStyleWarn && logger.warn('Sass, Less and PostCSS are not currently compiled by vue-jest')
9091
logger.shouldLogStyleWarn = false
9192
}
9293

0 commit comments

Comments
 (0)