diff --git a/test/api.js b/test/api.js index b8b1ec30c..2a37c12db 100644 --- a/test/api.js +++ b/test/api.js @@ -46,6 +46,19 @@ describe('api', function() { }); }); + it('should compile sass to css with outFile and sourceMap set to relative url', function(done) { + sass.render({ + file: fixture('simple/index.scss'), + sourceMap: './deep/nested/index.map', + outFile: './index-test.css', + + success: function(result) { + assert.equal(JSON.parse(result.map).file, '../../index-test.css'); + done(); + } + }); + }); + it('should compile sass to css with data', function(done) { var src = read(fixture('simple/index.scss'), 'utf8'); var expected = read(fixture('simple/expected.css'), 'utf8').trim(); @@ -379,6 +392,17 @@ describe('api', function() { done(); }); + it('should compile sass to css with outFile and sourceMap set to relative url', function(done) { + var result = sass.renderSync({ + file: fixture('simple/index.scss'), + sourceMap: './deep/nested/index.map', + outFile: './index-test.css' + }); + + assert.equal(JSON.parse(result.map).file, '../../index-test.css'); + done(); + }); + it('should compile sass to css with data', function(done) { var src = read(fixture('simple/index.scss'), 'utf8'); var expected = read(fixture('simple/expected.css'), 'utf8').trim();