improve test for #3023 (#3031)

This commit is contained in:
Alex Lam S.L 2018-03-29 23:36:40 +09:00 committed by GitHub
parent 82ae95c334
commit 9f9db504d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,9 +41,11 @@ describe("sourcemaps", function() {
"obj.wat([]);", "obj.wat([]);",
].join("\n"), { ].join("\n"), {
sourceMap: true, sourceMap: true,
toplevel: true,
}); });
if (result.error) throw result.error; if (result.error) throw result.error;
assert.strictEqual(result.map, '{"version":3,"sources":["0"],"names":["obj","wat"],"mappings":"AAAA,IAAIA,IAAM,GACVA,IAAIC,IAAI"}'); assert.strictEqual(result.code, "({}).wat([]);");
assert.strictEqual(result.map, '{"version":3,"sources":["0"],"names":["wat"],"mappings":"CAAU,IACNA,IAAI"}');
}); });
describe("inSourceMap", function() { describe("inSourceMap", function() {