From 08580edda8aa435769af76b87bb7aeccdffbb522 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Sat, 8 Nov 2014 09:17:21 +1100 Subject: [PATCH] fix up some tests --- .../generation/harmony-edgecase/computed-property/actual.js | 4 ++-- test/fixtures/transformation/destructuring/array/expected.js | 3 ++- .../transformation/destructuring/assignment/expected.js | 3 ++- test/fixtures/transformation/destructuring/empty/expected.js | 3 ++- .../destructuring/member-expression/expected.js | 3 ++- .../transformation/modules-common/overview/expected.js | 4 +--- test/fixtures/transformation/source-maps/full/source-map.json | 2 +- test/fixtures/transformation/source-maps/inline/expected.js | 1 + 8 files changed, 13 insertions(+), 10 deletions(-) diff --git a/test/fixtures/generation/harmony-edgecase/computed-property/actual.js b/test/fixtures/generation/harmony-edgecase/computed-property/actual.js index 2a4479e84b..e5db5ac150 100644 --- a/test/fixtures/generation/harmony-edgecase/computed-property/actual.js +++ b/test/fixtures/generation/harmony-edgecase/computed-property/actual.js @@ -1,6 +1,6 @@ var object1 = { get [Symbol.create]() { }, - set [set()](value) { }, + set [set()](value) { } }; var object2 = { *[generator()]() { } @@ -10,5 +10,5 @@ var object3 = { }; var object4 = { [Symbol.xxx]: "hello", - [ok()]: 42, + [ok()]: 42 }; diff --git a/test/fixtures/transformation/destructuring/array/expected.js b/test/fixtures/transformation/destructuring/array/expected.js index a9fecd9285..88726d5ab7 100644 --- a/test/fixtures/transformation/destructuring/array/expected.js +++ b/test/fixtures/transformation/destructuring/array/expected.js @@ -1,7 +1,8 @@ "use strict"; var _ref = ["hello", [", ", "junk"], ["world"]]; + var a = _ref[0]; var b = _ref[1][0]; var c = _ref[2][0]; -var d = _ref[3]; \ No newline at end of file +var d = _ref[3]; diff --git a/test/fixtures/transformation/destructuring/assignment/expected.js b/test/fixtures/transformation/destructuring/assignment/expected.js index cc933660fe..792c6693a2 100644 --- a/test/fixtures/transformation/destructuring/assignment/expected.js +++ b/test/fixtures/transformation/destructuring/assignment/expected.js @@ -1,5 +1,6 @@ "use strict"; var _ref = f(); + a = _ref[0]; -b = _ref[1]; \ No newline at end of file +b = _ref[1]; diff --git a/test/fixtures/transformation/destructuring/empty/expected.js b/test/fixtures/transformation/destructuring/empty/expected.js index 0e8947615d..63ea350455 100644 --- a/test/fixtures/transformation/destructuring/empty/expected.js +++ b/test/fixtures/transformation/destructuring/empty/expected.js @@ -1,7 +1,8 @@ "use strict"; var _ref = ["foo", "hello", [", ", "junk"], ["world"]]; + var a = _ref[1]; var b = _ref[2][0]; var c = _ref[3][0]; -var d = _ref[4]; \ No newline at end of file +var d = _ref[4]; diff --git a/test/fixtures/transformation/destructuring/member-expression/expected.js b/test/fixtures/transformation/destructuring/member-expression/expected.js index 2c69800a4f..10fe8bde68 100644 --- a/test/fixtures/transformation/destructuring/member-expression/expected.js +++ b/test/fixtures/transformation/destructuring/member-expression/expected.js @@ -1,5 +1,6 @@ "use strict"; var _ref = [1, 2]; + this.foo = _ref[0]; -this.bar = _ref[1]; \ No newline at end of file +this.bar = _ref[1]; diff --git a/test/fixtures/transformation/modules-common/overview/expected.js b/test/fixtures/transformation/modules-common/overview/expected.js index a08e44926a..327b597c50 100644 --- a/test/fixtures/transformation/modules-common/overview/expected.js +++ b/test/fixtures/transformation/modules-common/overview/expected.js @@ -1,15 +1,13 @@ "use strict"; require("foo"); - require("foo-bar"); - require("./directory/foo-bar"); - var foo = require("foo").default; var foo = require("foo"); var bar = require("foo").bar; var bar = require("foo").foo; + exports.test = test; var test = exports.test = 5; diff --git a/test/fixtures/transformation/source-maps/full/source-map.json b/test/fixtures/transformation/source-maps/full/source-map.json index 4e2e2c42ee..c56d653edf 100644 --- a/test/fixtures/transformation/source-maps/full/source-map.json +++ b/test/fixtures/transformation/source-maps/full/source-map.json @@ -3,6 +3,6 @@ "file": "source-maps/full/expected.js", "sources": ["source-maps/full/actual.js"], "names": [], - "mappings": ";AAAA,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAC;SAAK,EAAE,EAAE;CAAC,CAAC", + "mappings": "AAAA;;AAAA,GAAG,CAAC,GAAG,CAAC,UAAA,CAAC;SAAI,CAAC,GAAG,CAAC;CAAA,CAAC,CAAC", "sourcesContent": ["arr.map(x => x * x);"] } diff --git a/test/fixtures/transformation/source-maps/inline/expected.js b/test/fixtures/transformation/source-maps/inline/expected.js index e136af8d90..8f27163993 100644 --- a/test/fixtures/transformation/source-maps/inline/expected.js +++ b/test/fixtures/transformation/source-maps/inline/expected.js @@ -3,3 +3,4 @@ arr.map(function (x) { return x * x; }); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXBzL2lubGluZS9hY3R1YWwuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0FBQUEsR0FBRyxDQUFDLEdBQUcsQ0FBQyxVQUFBLENBQUM7U0FBSSxDQUFDLEdBQUcsQ0FBQztDQUFBLENBQUMsQ0FBQyIsImZpbGUiOiJzb3VyY2UtbWFwcy9pbmxpbmUvZXhwZWN0ZWQuanMiLCJzb3VyY2VzQ29udGVudCI6WyJhcnIubWFwKHggPT4geCAqIHgpOyJdfQ==