0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00
Bootstrap/scss/tests/sass-true/runner.js
XhmikosR d891159950
Make scss tests work on Windows too. (#37713)
Also, add missing `'use strict'` statements; these aren't real modules.
2022-12-25 18:09:26 +02:00

18 lines
422 B
JavaScript

/* eslint-env node */
'use strict'
const { runSass } = require('sass-true')
const fs = require('node:fs')
const path = require('node:path')
module.exports = (filename, { describe, it }) => {
const data = fs.readFileSync(filename, 'utf8')
const TRUE_SETUP = '$true-terminal-output: false; @import "true";'
runSass({
data: TRUE_SETUP + data,
includePaths: [path.dirname(filename)]
}, { describe, it })
}