From f74305f7c59aae93bbac2f4f3c571c3f4b90d02b Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 17 Jun 2019 14:30:40 -0400 Subject: [PATCH] Add test confirming @ember/application/deprecations is transpiled properly. --- node-tests/addon-test.js | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/node-tests/addon-test.js b/node-tests/addon-test.js index 24cec5ea..ad67b21f 100644 --- a/node-tests/addon-test.js +++ b/node-tests/addon-test.js @@ -254,7 +254,29 @@ describe('ember-cli-babel', function() { "foo.js": stripIndent` import { assert } from '@ember/debug'; assert('stuff here', isNotBad()); - ` + `, + "bar.js": stripIndent` + import { deprecate } from '@ember/debug'; + deprecate( + 'foo bar baz', + false, + { + id: 'some-id', + until: '1.0.0', + } + ); + `, + "baz.js": stripIndent` + import { deprecate } from '@ember/application/deprecations'; + deprecate( + 'foo bar baz', + false, + { + id: 'some-id', + until: '1.0.0', + } + ); + `, }); subject = this.addon.transpileTree(input.path()); @@ -265,7 +287,9 @@ describe('ember-cli-babel', function() { expect( output.read() ).to.deep.equal({ - "foo.js": `define("foo", [], function () {\n "use strict";\n\n (true && !(isNotBad()) && Ember.assert('stuff here', isNotBad()));\n});` + "bar.js": `define("bar", [], function () {\n "use strict";\n\n (true && !(false) && Ember.deprecate('foo bar baz', false, {\n id: 'some-id',\n until: '1.0.0'\n }));\n});`, + "baz.js": `define("baz", [], function () {\n "use strict";\n\n (true && !(false) && Ember.deprecate('foo bar baz', false, {\n id: 'some-id',\n until: '1.0.0'\n }));\n});`, + "foo.js": `define("foo", [], function () {\n "use strict";\n\n (true && !(isNotBad()) && Ember.assert('stuff here', isNotBad()));\n});`, }); })); });