Skip to content

Commit

Permalink
Merge pull request #175 from macbre/tests-node-sass
Browse files Browse the repository at this point in the history
Run tests with node-sass installed
  • Loading branch information
macbre committed Aug 4, 2020
2 parents 3466986 + 3dcf409 commit 419200c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,19 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test

- name: Install dependencies
run: npm ci

- name: Lint the code
run: npm run lint

- name: Run tests (with node-sass support)
run: |
npm install node-sass@4.14.1
npm test
- name: Check that "binary" script works
run: ./bin/analyze-css.js --file examples/ti.mobile.css -p | grep metrics -B2
run: |
./bin/analyze-css.js --file examples/ti.mobile.css -p | grep metrics -B2
./bin/analyze-css.js --file examples/base.scss -p | grep offenders -A3
2 changes: 1 addition & 1 deletion lib/preprocessors/sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
throw new Error("Can't process SASS/SCSS, please run 'npm install node-sass'");
}

var includeDir = path.dirname(options.file);
var includeDir = options.file ? path.dirname(options.file) : undefined;
debug('Using "%s" include path', includeDir);

try {
Expand Down

0 comments on commit 419200c

Please sign in to comment.