From bd2e3d784fdb430b05d1d16953750606401675eb Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 3 Nov 2014 11:09:14 +1100 Subject: [PATCH] fix source-map transformation tests --- .../source-maps/arrow-function/expected.js | 1 - .../arrow-function/source-mappings.json | 2 +- .../source-maps/class/expected.js | 22 ++++++------------- .../source-maps/class/source-mappings.json | 4 ++-- 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/test/fixtures/transformation/source-maps/arrow-function/expected.js b/test/fixtures/transformation/source-maps/arrow-function/expected.js index bdec8047ef..d39e2afebe 100644 --- a/test/fixtures/transformation/source-maps/arrow-function/expected.js +++ b/test/fixtures/transformation/source-maps/arrow-function/expected.js @@ -1,5 +1,4 @@ "use strict"; - var t = function(x) { return x * x; }; diff --git a/test/fixtures/transformation/source-maps/arrow-function/source-mappings.json b/test/fixtures/transformation/source-maps/arrow-function/source-mappings.json index d6c4b7d064..02a7a17ee3 100644 --- a/test/fixtures/transformation/source-maps/arrow-function/source-mappings.json +++ b/test/fixtures/transformation/source-maps/arrow-function/source-mappings.json @@ -4,7 +4,7 @@ "column": 18 }, "generated": { - "line": 4, + "line": 3, "column": 14 } }] diff --git a/test/fixtures/transformation/source-maps/class/expected.js b/test/fixtures/transformation/source-maps/class/expected.js index f4598117c3..c250bea2cb 100644 --- a/test/fixtures/transformation/source-maps/class/expected.js +++ b/test/fixtures/transformation/source-maps/class/expected.js @@ -1,18 +1,10 @@ "use strict"; - -var Test = function() { +var Test = (function () { var Test = function Test() {}; - - Object.defineProperties(Test.prototype, { - bar: { - get: function() { - throw new Error("wow"); - } - } - }); - + Object.defineProperties(Test.prototype, { bar: { get: function () { + throw new Error("wow"); + } } }); return Test; -}(); - -var test = new Test(); -test.bar; \ No newline at end of file +})(); +var test = new Test; +test.bar; diff --git a/test/fixtures/transformation/source-maps/class/source-mappings.json b/test/fixtures/transformation/source-maps/class/source-mappings.json index 259fd68b40..4a222cd380 100644 --- a/test/fixtures/transformation/source-maps/class/source-mappings.json +++ b/test/fixtures/transformation/source-maps/class/source-mappings.json @@ -4,7 +4,7 @@ "column": 11 }, "generated": { - "line": 9, - "column": 15 + "line": 5, + "column": 11 } }]