@@ -3,7 +3,8 @@ import sass from 'node-sass';
33import { expect } from 'chai' ;
44import { resolve } from 'path' ;
55
6- const EXPECTATION = 'body {\n color: #c33; }\n' ;
6+ const EXPECTATION1 = 'body {\n color: #c33; }\n' ;
7+ const EXPECTATION2 = 'p::after {\n content: "Ashness Pier, Derwentwater, Lake District, Cumbria, UK."; }\n' ;
78
89describe ( 'Import type test' , function ( ) {
910
@@ -13,7 +14,17 @@ describe('Import type test', function() {
1314 importer : jsonImporter
1415 } ) ;
1516
16- expect ( result . css . toString ( ) ) . to . eql ( EXPECTATION ) ;
17+ expect ( result . css . toString ( ) ) . to . eql ( EXPECTATION1 ) ;
18+ } ) ;
19+
20+ // Added as failing test for: https://github.com/Updater/node-sass-json-importer/pull/5
21+ it ( 'imports strings with spaces and/or commas' , function ( ) {
22+ let result = sass . renderSync ( {
23+ file : './test/fixtures/strings/content.scss' ,
24+ importer : jsonImporter
25+ } ) ;
26+
27+ expect ( result . css . toString ( ) ) . to . eql ( EXPECTATION2 ) ;
1728 } ) ;
1829
1930 it ( 'imports lists' , function ( ) {
@@ -22,7 +33,7 @@ describe('Import type test', function() {
2233 importer : jsonImporter
2334 } ) ;
2435
25- expect ( result . css . toString ( ) ) . to . eql ( EXPECTATION ) ;
36+ expect ( result . css . toString ( ) ) . to . eql ( EXPECTATION1 ) ;
2637 } ) ;
2738
2839 it ( 'imports maps' , function ( ) {
@@ -31,7 +42,7 @@ describe('Import type test', function() {
3142 importer : jsonImporter
3243 } ) ;
3344
34- expect ( result . css . toString ( ) ) . to . eql ( EXPECTATION ) ;
45+ expect ( result . css . toString ( ) ) . to . eql ( EXPECTATION1 ) ;
3546 } ) ;
3647
3748 it ( 'finds imports via includePaths' , function ( ) {
@@ -41,7 +52,7 @@ describe('Import type test', function() {
4152 importer : jsonImporter
4253 } ) ;
4354
44- expect ( result . css . toString ( ) ) . to . eql ( EXPECTATION ) ;
55+ expect ( result . css . toString ( ) ) . to . eql ( EXPECTATION1 ) ;
4556 } ) ;
4657
4758 it ( 'finds imports via multiple includePaths' , function ( ) {
@@ -51,7 +62,7 @@ describe('Import type test', function() {
5162 importer : jsonImporter
5263 } ) ;
5364
54- expect ( result . css . toString ( ) ) . to . eql ( EXPECTATION ) ;
65+ expect ( result . css . toString ( ) ) . to . eql ( EXPECTATION1 ) ;
5566 } ) ;
5667
5768 it ( `throws when an import doesn't exist` , function ( ) {
0 commit comments