From ba7d327fbe61c1a6f626e62874b394d2f459fed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 17 Aug 2018 15:36:55 +0200 Subject: [PATCH] Remove env preset from tests (Review by @hzoo) --- .../computed-keys-same-ast/output.js | 23 ++++++++++--------- .../computed-keys-same-value/output.js | 23 ++++++++++--------- .../fixtures/duplicated-keys/options.json | 3 +-- .../fixtures/element-descriptors/options.json | 3 +-- .../test/fixtures/finishers/options.json | 3 +-- .../test/fixtures/ordering/options.json | 3 +-- 6 files changed, 28 insertions(+), 30 deletions(-) diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-ast/output.js b/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-ast/output.js index 03587f4c1d63..a08d2e1db86d 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-ast/output.js +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-ast/output.js @@ -1,30 +1,31 @@ -var Foo = babelHelpers.decorate([function (_) { - return desc = _; -}], function (_initialize) { +let Foo = babelHelpers.decorate([_ => desc = _], function (_initialize) { "use strict"; - var Foo = function Foo() { - "use strict"; + class Foo { + constructor() { + _initialize(this); + } - babelHelpers.classCallCheck(this, Foo); - - _initialize(this); - }; + } return { F: Foo, d: [{ kind: "method", key: getKey(), - value: function value() { + + value() { return 1; } + }, { kind: "method", key: getKey(), - value: function value() { + + value() { return 2; } + }] }; }); diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-value/output.js b/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-value/output.js index 333641d3a0c7..bffa9e17a1d9 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-value/output.js +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-value/output.js @@ -1,30 +1,31 @@ -var Foo = babelHelpers.decorate([function (_) { - return desc = _; -}], function (_initialize) { +let Foo = babelHelpers.decorate([_ => desc = _], function (_initialize) { "use strict"; - var Foo = function Foo() { - "use strict"; + class Foo { + constructor() { + _initialize(this); + } - babelHelpers.classCallCheck(this, Foo); - - _initialize(this); - }; + } return { F: Foo, d: [{ kind: "method", key: getKeyI(), - value: function value() { + + value() { return 1; } + }, { kind: "method", key: getKeyJ(), - value: function value() { + + value() { return 2; } + }] }; }); diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/options.json b/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/options.json index 923a925270e0..4f9b5b01d18f 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/options.json +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/options.json @@ -3,6 +3,5 @@ ["proposal-decorators", { "decoratorsBeforeExport": false }], "proposal-class-properties", "external-helpers" - ], - "presets": ["env"] + ] } diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/options.json b/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/options.json index 923a925270e0..4f9b5b01d18f 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/options.json +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/options.json @@ -3,6 +3,5 @@ ["proposal-decorators", { "decoratorsBeforeExport": false }], "proposal-class-properties", "external-helpers" - ], - "presets": ["env"] + ] } diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/finishers/options.json b/packages/babel-plugin-proposal-decorators/test/fixtures/finishers/options.json index 923a925270e0..4f9b5b01d18f 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/finishers/options.json +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/finishers/options.json @@ -3,6 +3,5 @@ ["proposal-decorators", { "decoratorsBeforeExport": false }], "proposal-class-properties", "external-helpers" - ], - "presets": ["env"] + ] } diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/ordering/options.json b/packages/babel-plugin-proposal-decorators/test/fixtures/ordering/options.json index 923a925270e0..4f9b5b01d18f 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/ordering/options.json +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/ordering/options.json @@ -3,6 +3,5 @@ ["proposal-decorators", { "decoratorsBeforeExport": false }], "proposal-class-properties", "external-helpers" - ], - "presets": ["env"] + ] }