Skip to content
This repository has been archived by the owner on Mar 14, 2022. It is now read-only.

Commit

Permalink
Make sass-true understand how to include sass files from bower_compon…
Browse files Browse the repository at this point in the history
…ents folder (#521)
  • Loading branch information
JakeChampion authored Apr 20, 2018
1 parent 2e198ab commit 03cb243
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/tasks/test-sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ const trueTest = function (config) {
const testRunner = path.join(config.cwd, 'test/scss/test-runner.js');
return writeFile(testRunner, `
const path = require('path');
const componentBase = path.join(__dirname, '../../');
const sassFile = path.join(__dirname, 'index.test.scss');
const sassTrue = require('${require.resolve('sass-true')}');
sassTrue.runSass({file: sassFile}, describe, it);
sassTrue.runSass({
file: sassFile,
// We use this to silence the sass console output when running "obt test".
functions: {},
includePaths: [componentBase, path.join(componentBase, 'bower_components')]
}, describe, it);
`)
.then(() => commandLine.run('mocha', ['test/scss'], Object.assign({}, config, { localDir: path.join(__dirname, "../../")})))
.finally(() => unlink(testRunner));
Expand Down

0 comments on commit 03cb243

Please sign in to comment.