From b084708c5c9e76844d06690badb5cf170f355110 Mon Sep 17 00:00:00 2001 From: Sascha Gehlich Date: Fri, 30 Dec 2016 13:16:13 +0100 Subject: [PATCH 1/2] Add failing test for importing files with indented syntax --- test/test.importer.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/test/test.importer.js b/test/test.importer.js index d50b948..e30afeb 100644 --- a/test/test.importer.js +++ b/test/test.importer.js @@ -229,6 +229,33 @@ describe('importer', function() { }); }); + it.only('should support indented syntax', function(done) { + var source = '@import "testfile"'; + var expected = '.m {\n width: 123px; }\n'; + + Sass.importer(function(request, done) { + done({ + content: request.options.gustav, + }); + }); + + Sass.options('defaults'); + Sass.options({ + indentedSyntax: true, + }); + + var options = { + importer: { + gustav: '$foo: 123px\n\n.m\n width: $foo', + }, + }; + + Sass.compile(source, options, function(result) { + expect(result.text).to.equal(expected); + done(); + }); + }); + it('should use correct options', function(done) { var source = '@import "testfile";'; var alpha = '.alpha{content:"alpha"}\n'; From 941c0bba5b0727556377308b4770f519f80285cb Mon Sep 17 00:00:00 2001 From: Sascha Gehlich Date: Fri, 30 Dec 2016 13:18:13 +0100 Subject: [PATCH 2/2] Remove test exclusivity --- test/test.importer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test.importer.js b/test/test.importer.js index e30afeb..91d2f33 100644 --- a/test/test.importer.js +++ b/test/test.importer.js @@ -229,7 +229,7 @@ describe('importer', function() { }); }); - it.only('should support indented syntax', function(done) { + it('should support indented syntax', function(done) { var source = '@import "testfile"'; var expected = '.m {\n width: 123px; }\n';