From a38f96172eb1b5465a18ef376f7386df4a1cdc2f Mon Sep 17 00:00:00 2001 From: Yuichi Tanikawa Date: Fri, 8 Apr 2016 14:19:47 +0900 Subject: [PATCH] Don't return a nested array of paths in #with() too --- index.js | 2 +- test/with_test.js | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index f991a80..7ad1c20 100644 --- a/index.js +++ b/index.js @@ -6,6 +6,6 @@ module.exports = { with: function() { var paths = Array.prototype.slice.call(arguments); - return [].concat.apply([bourbon.includePaths], paths); + return [].concat.apply(bourbon.includePaths, paths); } }; diff --git a/test/with_test.js b/test/with_test.js index 3baedf4..bed6136 100644 --- a/test/with_test.js +++ b/test/with_test.js @@ -1,5 +1,7 @@ -var sass = require('node-sass') - , bourbon = require('../'); +const chai = require('chai'); +const assert = chai.assert; +const sass = require('node-sass'); +const bourbon = require('../'); function partialsDir(path) { return __dirname + '/fixtures/concat/' + path; @@ -15,6 +17,11 @@ function errorHandler(err) { describe('#with function', function() { + it('should return an array of paths', function() { + assert.isArray(bourbon.with()); + assert.isString(bourbon.with()[0], 'first #with function path'); + }); + it('should concat string paths using #with', function(done) { sass.render({ file: __dirname + '/fixtures/concat.scss',