Skip to content

Commit

Permalink
upgrade source-map to 0.7.2 and move it to mandatory deps
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed Mar 5, 2018
1 parent f0488e1 commit e982239
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@
"estraverse": "^4.2.0",
"esutils": "^2.0.2",
"esprima": "^3.1.3",
"optionator": "^0.8.1"
},
"optionalDependencies": {
"source-map": "~0.6.1"
"optionator": "^0.8.1",
"source-map": "~0.7.2"
},
"devDependencies": {
"acorn": "^4.0.4",
Expand Down
8 changes: 5 additions & 3 deletions test/source-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ describe('source map test', function () {
expect(result.map._names._array.length).to.be.equal(3);
});

it('sourceContent support', function() {
it('sourceContent support', function(done) {
var source = "(+ a b)"
var ast = {
"type": "ExpressionStatement",
Expand Down Expand Up @@ -499,8 +499,10 @@ describe('source map test', function () {
expect(output.code).to.be.equal("a + b;");


var consumer = new sourcemap.SourceMapConsumer(output.map.toString());
expect(consumer.sourceContentFor("sum.ls")).to.be.equal(source);
new sourcemap.SourceMapConsumer(output.map.toString()).then(function(consumer) {
expect(consumer.sourceContentFor("sum.ls")).to.be.equal(source);
done();
});
});

it('sourceMapWithCode forces output format', function() {
Expand Down

0 comments on commit e982239

Please sign in to comment.