diff --git a/scripts/coverage.js b/scripts/coverage.js index d0f406324..f76e7b2dd 100644 --- a/scripts/coverage.js +++ b/scripts/coverage.js @@ -56,7 +56,7 @@ function coverage() { instrumentedfiles.push(source); if (instrumentedfiles.length === sourcefiles.length) { fs.readdirSync('test').filter(function(file){ - return file.substr(-6) === 'api.js'; + return file.substr(-6) === 'api.js' || file.substr(-7) === 'spec.js'; }).forEach(function(file){ mocha.addFile( path.join('test', file) diff --git a/test/spec.js b/test/spec.js index 1f2d26ff1..175fb6ad2 100644 --- a/test/spec.js +++ b/test/spec.js @@ -3,7 +3,9 @@ var assert = require('assert'), exists = fs.existsSync, path = require('path'), read = fs.readFileSync, - sass = require('../lib'), + sass = process.env.NODESASS_COV + ? require('../lib-cov') + : require('../lib'), util = require('./util'); describe('spec', function() {