mirror of
https://github.com/black7375/Firefox-UI-Fix.git
synced 2025-12-15 15:20:33 -08:00
Fix: Test - Run each test
This commit is contained in:
parent
c27ad836dc
commit
f7d5ff2c20
1 changed files with 5 additions and 7 deletions
|
|
@ -3,13 +3,11 @@ const sassTrue = require("sass-true");
|
|||
const glob = require("glob");
|
||||
|
||||
// https://www.educative.io/blog/sass-tutorial-unit-testing-with-sass-true
|
||||
describe("Sass", () => {
|
||||
// Find all of the Sass files that end in `*.test.scss` in any directory of this project.
|
||||
// I use path.resolve because True requires absolute paths to compile test files.
|
||||
const sassTestFiles = glob.sync(path.resolve(process.cwd(), "__tests__/**/*.test.scss"));
|
||||
// Find all of the Sass files that end in `*.test.scss` in any directory of this project.
|
||||
// I use path.resolve because True requires absolute paths to compile test files.
|
||||
const sassTestFiles = glob.sync(path.resolve(process.cwd(), "__tests__/**/*.test.scss"));
|
||||
|
||||
// Run True on every file found with the describe and it methods provided
|
||||
sassTestFiles.forEach(file =>
|
||||
sassTrue.runSass({ file }, { describe, it })
|
||||
);
|
||||
sassTestFiles.forEach(file => {
|
||||
describe(file, () => sassTrue.runSass({ file }, { describe, it }));
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue