Skip to content

Commit 7cf388a

Browse files
kuma taroeddyerburgh
kuma taro
authored andcommitted
fix: display scss warning only once (#59)
1 parent c26db3b commit 7cf388a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/process.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,13 @@ module.exports = function (src, filePath) {
101101
}
102102

103103
if (Array.isArray(parts.styles) && parts.styles.length > 0) {
104+
if (parts.styles.some(ast => /^scss|sass|less|pcss|postcss/.test(ast.lang))) {
105+
logger.warn('Sass/SCSS, Less and PostCSS are not currently compiled by vue-jest')
106+
}
107+
104108
const styleStr = parts.styles.map(ast => {
105109
if (!module) return
106110
if (/^scss|sass|less|pcss|postcss/.test(ast.lang)) {
107-
logger.warn('Sass/SCSS, Less and PostCSS are not currently compiled by vue-jest')
108111
return false
109112
}
110113

0 commit comments

Comments
 (0)