Skip to content

Commit

Permalink
Add test to uglifyjs for source map
Browse files Browse the repository at this point in the history
  • Loading branch information
srod committed Feb 11, 2017
1 parent b127aef commit 6fd2da0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/node-minify.js
Expand Up @@ -651,6 +651,26 @@ describe('node-minify', function() {
tests.commonjs.forEach(function(o) {
runOneTest(o, 'uglifyjs');
});
it('should create a source map', function(done) {
var options = {};
options.minify = {
compressor: 'uglifyjs',
input: __dirname + '/../examples/public/js/**/*.js',
output: fileJSOut,
options: {
outSourceMap: fileJSOut + '.map'
}
};

options.minify.callback = function(err, min) {
should.not.exist(err);
should.exist(min);

done();
};

nodeMinify.minify(options.minify);
});
});

describe('Clean-css', function() {
Expand Down

0 comments on commit 6fd2da0

Please sign in to comment.