From de6af93958d17e825d7cf9dd6b10864aa06b0ddb Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Wed, 25 Mar 2015 19:49:52 +0000 Subject: [PATCH] Add a sass file to the inheritance test --- test/expected/inheritance.css | 3 +++ test/main.js | 4 ++-- test/scss/includes/_dogs.sass | 5 +++++ test/scss/inheritance.scss | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 test/scss/includes/_dogs.sass diff --git a/test/expected/inheritance.css b/test/expected/inheritance.css index d2c002a..62fc9a3 100644 --- a/test/expected/inheritance.css +++ b/test/expected/inheritance.css @@ -1,6 +1,9 @@ body { background: pink; } +footer { + background: red; } + .error, .badError { border: #f00; background: #fdd; } diff --git a/test/main.js b/test/main.js index 15914f3..c187d89 100644 --- a/test/main.js +++ b/test/main.js @@ -5,7 +5,6 @@ var gutil = require('gulp-util'); var path = require('path'); var fs = require('fs'); var sass = require('../index'); -var assert = require('assert'); var createVinyl = function createVinyl(filename, contents) { var base = path.join(__dirname, 'scss'); @@ -131,6 +130,7 @@ describe('gulp-sass -- async compile', function() { // Expected sources are relative to file.base var expectedSources = [ 'includes/_cats.scss', + 'includes/_dogs.sass', 'inheritance.scss' ]; @@ -148,7 +148,7 @@ describe('gulp-sass -- async compile', function() { stream = sass(); stream.on('data', function(cssFile) { should.exist(cssFile.sourceMap); - assert.deepEqual(cssFile.sourceMap.sources, expectedSources); + cssFile.sourceMap.sources.should.eql(expectedSources); done(); }); stream.write(sassFile); diff --git a/test/scss/includes/_dogs.sass b/test/scss/includes/_dogs.sass new file mode 100644 index 0000000..fbdee6e --- /dev/null +++ b/test/scss/includes/_dogs.sass @@ -0,0 +1,5 @@ +$blue: #3bbfce; +$margin: 16px; + +footer + background: red; diff --git a/test/scss/inheritance.scss b/test/scss/inheritance.scss index f42ec79..b2cab38 100644 --- a/test/scss/inheritance.scss +++ b/test/scss/inheritance.scss @@ -1,4 +1,5 @@ @import "includes/cats"; +@import "includes/dogs"; .error { border: #f00;