aboutsummaryrefslogtreecommitdiff
path: root/test/mocha
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-03-31 18:48:20 +0900
committerGitHub <noreply@github.com>2018-03-31 18:48:20 +0900
commit02f47e1713cb413ac0d2602039c18292f43db863 (patch)
treec80e7fb999a2bb5c71192a6b627b4c4d4f725066 /test/mocha
parent07f64d4050cd28cf2a837d30ce2938fa9628ff57 (diff)
downloadtracifyjs-02f47e1713cb413ac0d2602039c18292f43db863.tar.gz
tracifyjs-02f47e1713cb413ac0d2602039c18292f43db863.zip
give sensible error against invalid input source map (#3044)
Diffstat (limited to 'test/mocha')
-rw-r--r--test/mocha/cli.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/mocha/cli.js b/test/mocha/cli.js
index 10f0465a..7f0bd79f 100644
--- a/test/mocha/cli.js
+++ b/test/mocha/cli.js
@@ -56,6 +56,18 @@ describe("bin/uglifyjs", function () {
done();
});
});
+ it("Should give sensible error against invalid input source map", function(done) {
+ var command = uglifyjscmd + " test/mocha.js --source-map content=blah,url=inline";
+
+ exec(command, function (err, stdout, stderr) {
+ assert.ok(err);
+ assert.deepEqual(stderr.split(/\n/).slice(0, 2), [
+ "INFO: Using input source map: blah",
+ "ERROR: invalid input source map: blah",
+ ]);
+ done();
+ });
+ });
it("Should append source map to output when using --source-map url=inline", function (done) {
var command = uglifyjscmd + " test/input/issue-1323/sample.js --source-map url=inline";