UNPKG

544 BJavaScriptView Raw
1/**
2 * @jest-environment node
3 *
4 * sassTrue.runSass cannot find the file when testEnvironment is set to `test`
5 * only with dart-sass.
6 * See https://github.com/oddbird/true/issues/156
7 */
8
9const fs = require('fs');
10const path = require('path');
11const sassTrue = require('sass-true');
12
13const testFiles = fs
14 .readdirSync(__dirname)
15 .filter((file) => file.endsWith('.spec.scss'))
16 .map((file) => path.resolve(__dirname, file));
17
18testFiles.forEach((file) => {
19 sassTrue.runSass(
20 { file },
21 {
22 describe,
23 it,
24 }
25 );
26});