improve test for #3023 (#3031)
authorAlex Lam S.L <alexlamsl@gmail.com>
Thu, 29 Mar 2018 14:36:40 +0000 (23:36 +0900)
committerGitHub <noreply@github.com>
Thu, 29 Mar 2018 14:36:40 +0000 (23:36 +0900)
test/mocha/sourcemaps.js

index 7f4acb7..a1a8e61 100644 (file)
@@ -41,9 +41,11 @@ describe("sourcemaps", function() {
             "obj.wat([]);",
         ].join("\n"), {
             sourceMap: true,
+            toplevel: true,
         });
         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() {