Skip to content

Commit

Permalink
Add test confirming @ember/application/deprecations is transpiled pro…
Browse files Browse the repository at this point in the history
…perly.
  • Loading branch information
rwjblue committed Jun 17, 2019
1 parent 9ac404d commit f74305f
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions node-tests/addon-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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});`,
});
}));
});
Expand Down

0 comments on commit f74305f

Please sign in to comment.