From 07623d29e8f87b100e809c915dde60d941ba84d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renato=20de=20Le=C3=A3o?= Date: Fri, 29 Nov 2019 20:38:49 +0000 Subject: [PATCH] Add dart sass as sass engine for testing required to add a jest config variable to package.json to overcome this issue https://github.com/oddbird/true/issues/156 --- package.json | 3 +++ scss.spec.js | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index faec16a..d9c76c9 100644 --- a/package.json +++ b/package.json @@ -61,5 +61,8 @@ "dependencies": { "mappy-breakpoints": "^0.2.3", "normalize.css": "^8.0.1" + }, + "jest": { + "testEnvironment": "node" } } diff --git a/scss.spec.js b/scss.spec.js index 16860d3..86b1cea 100644 --- a/scss.spec.js +++ b/scss.spec.js @@ -1,7 +1,10 @@ const { runSass } = require('sass-true') const { sync } = require('glob'); +const sass = require('sass'); describe('SCSS', () => { const files = sync('scss/**/*.spec.scss') - files.forEach(file => runSass({ file }, {describe, it}) ) + files.forEach(file => { + runSass({ file }, { sass, describe, it }) + }) })