Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Test: Adds sourceMap path related tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 committed Feb 10, 2015
1 parent 115e260 commit 98162cd
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 98162cd

Please # to comment.