aboutsummaryrefslogtreecommitdiff
path: root/test/mocha/comment-filter.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/mocha/comment-filter.js')
-rw-r--r--test/mocha/comment-filter.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/mocha/comment-filter.js b/test/mocha/comment-filter.js
index 9474e732..ec17aa8c 100644
--- a/test/mocha/comment-filter.js
+++ b/test/mocha/comment-filter.js
@@ -79,5 +79,13 @@ describe("comment filters", function() {
output: { preamble: "/* Build */" }
}).code;
assert.strictEqual(code, "#!/usr/bin/node\n/* Build */\nvar x=10;");
- })
+ });
+
+ it("Should handle preamble without shebang correctly", function() {
+ var code = UglifyJS.minify("var x = 10;", {
+ fromString: true,
+ output: { preamble: "/* Build */" }
+ }).code;
+ assert.strictEqual(code, "/* Build */\nvar x=10;");
+ });
});