diff --git a/blueprints/component-test/index.js b/blueprints/component-test/index.js index 763cf54775d..05c6cfdc2bb 100644 --- a/blueprints/component-test/index.js +++ b/blueprints/component-test/index.js @@ -62,9 +62,9 @@ module.exports = useTestFrameworkDetector({ componentPathName = [options.path, dasherizedModuleName].filter(Boolean).join('/'); } - let inlinePrecompileModule = this._useSeparateInlinePrecompileAddon() - ? 'htmlbars-inline-precompile' - : 'ember-cli-htmlbars'; + let hbsImportStatement = this._useSeparateInlinePrecompileAddon() + ? "import hbs from 'htmlbars-inline-precompile';" + : "import { hbs } from 'ember-cli-htmlbars';"; let templateInvocation = invocationFor(options); let componentName = templateInvocation; @@ -82,7 +82,7 @@ module.exports = useTestFrameworkDetector({ closeComponent, selfCloseComponent, friendlyTestDescription, - inlinePrecompileModule, + hbsImportStatement, }; }, diff --git a/blueprints/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js b/blueprints/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js index f1abc6fdc48..e7fcd4d3f08 100644 --- a/blueprints/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js +++ b/blueprints/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.js @@ -1,7 +1,7 @@ <% if (testType === 'integration') { %>import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render } from '@ember/test-helpers'; -import hbs from '<%= inlinePrecompileModule %>'; +<%= hbsImportStatement %> module('<%= friendlyTestDescription %>', function(hooks) { setupRenderingTest(hooks);