From 25207784230da799f0df9b962dfc25c10ce04ad7 Mon Sep 17 00:00:00 2001 From: km-tr Date: Tue, 20 Feb 2018 20:14:19 +0900 Subject: [PATCH] fix: display scss warning only once --- lib/process.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/process.js b/lib/process.js index ff247c24..9126cab4 100644 --- a/lib/process.js +++ b/lib/process.js @@ -101,10 +101,13 @@ module.exports = function (src, filePath) { } if (Array.isArray(parts.styles) && parts.styles.length > 0) { + if (parts.styles.some(ast => /^scss|sass|less|pcss|postcss/.test(ast.lang))) { + logger.warn('Sass/SCSS, Less and PostCSS are not currently compiled by vue-jest') + } + const styleStr = parts.styles.map(ast => { if (!module) return if (/^scss|sass|less|pcss|postcss/.test(ast.lang)) { - logger.warn('Sass/SCSS, Less and PostCSS are not currently compiled by vue-jest') return false }