Skip to content

Commit

Permalink
Merge pull request #18415 from emberjs/fix-component-tests-blueprint
Browse files Browse the repository at this point in the history
[BUGFIX beta] Fix hbs import path
  • Loading branch information
chancancode authored Sep 20, 2019
2 parents 22f1951 + 20746cc commit 3c45c3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions blueprints/component-test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -82,7 +82,7 @@ module.exports = useTestFrameworkDetector({
closeComponent,
selfCloseComponent,
friendlyTestDescription,
inlinePrecompileModule,
hbsImportStatement,
};
},

Expand Down
Original file line number Diff line number Diff line change
@@ -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);
Expand Down

0 comments on commit 3c45c3b

Please sign in to comment.