Skip to content

Commit

Permalink
Silence Sass test logger unless mocked
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Feb 27, 2023
1 parent 2ddf022 commit 360cd32
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/jest-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const cheerio = require('cheerio')
const { configureAxe } = require('jest-axe')
const nunjucks = require('nunjucks')
const { outdent } = require('outdent')
const { compileAsync, compileStringAsync } = require('sass-embedded')
const { compileAsync, compileStringAsync, Logger } = require('sass-embedded')

const { paths } = require('../config/index.js')

Expand Down Expand Up @@ -135,6 +135,7 @@ async function getExamples (componentName) {
async function compileSassFile (path, options = {}) {
return compileAsync(path, {
loadPaths: sassPaths,
logger: Logger.silent,
quietDeps: true,
...options
})
Expand All @@ -150,6 +151,7 @@ async function compileSassFile (path, options = {}) {
async function compileSassString (source, options = {}) {
return compileStringAsync(source, {
loadPaths: sassPaths,
logger: Logger.silent,
quietDeps: true,
...options
})
Expand Down

0 comments on commit 360cd32

Please sign in to comment.