Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ember.assert is not renamed when import { assert as X } is used #373

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions node-tests/addon-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ describe('ember-cli-babel', function() {
it("should replace imports by default", co.wrap(function* () {
input.write({
"foo.js": `import Component from '@ember/component'; Component.extend()`,
"app.js": `import Application from '@ember/application'; Application.extend()`
"app.js": `import Application from '@ember/application'; Application.extend()`,
"assert.js": `import { assert as debugAssert } from '@ember/debug';\ndebugAssert('some message', false);`,
});

subject = this.addon.transpileTree(input.path());
Expand All @@ -165,7 +166,8 @@ describe('ember-cli-babel', function() {
output.read()
).to.deep.equal({
"foo.js": `define("foo", [], function () {\n "use strict";\n\n Ember.Component.extend();\n});`,
"app.js": `define("app", [], function () {\n "use strict";\n\n Ember.Application.extend();\n});`
"app.js": `define("app", [], function () {\n "use strict";\n\n Ember.Application.extend();\n});`,
"assert.js": `define("assert", [], function () {\n "use strict";\n\n (true && !(false) && Ember.assert('some message', false));\n});`
});
}));

Expand Down