aboutsummaryrefslogtreecommitdiff
path: root/test/mocha/sourcemaps.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-04-15 10:25:58 +0100
committerGitHub <noreply@github.com>2020-04-15 17:25:58 +0800
commit6e9afdc94fd51a827e9d9db51d650e15681866d3 (patch)
treeae59f88dc3900c24fa47b2a86fb34e097eaa95c3 /test/mocha/sourcemaps.js
parentc4d28e3b2a2d82c7e5e3b398513755b507a75e76 (diff)
downloadtracifyjs-6e9afdc94fd51a827e9d9db51d650e15681866d3.tar.gz
tracifyjs-6e9afdc94fd51a827e9d9db51d650e15681866d3.zip
prevent input source map mutation (#3781)
fixes #3780
Diffstat (limited to 'test/mocha/sourcemaps.js')
-rw-r--r--test/mocha/sourcemaps.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/mocha/sourcemaps.js b/test/mocha/sourcemaps.js
index f8e399ce..23698c57 100644
--- a/test/mocha/sourcemaps.js
+++ b/test/mocha/sourcemaps.js
@@ -277,6 +277,12 @@ describe("sourcemaps", function() {
});
describe("input sourcemaps", function() {
+ it("Should not modify input source map", function() {
+ var orig = get_map();
+ var original = JSON.stringify(orig);
+ var map = prepare_map(orig);
+ assert.strictEqual(JSON.stringify(orig), original);
+ });
it("Should copy over original sourcesContent", function() {
var orig = get_map();
var map = prepare_map(orig);