Skip to content

Commit 1a5d5b5

Browse files
committed
Update the component import path in addon tests
We now use the addon name instead of the modulePrefix.
1 parent a0bd95e commit 1a5d5b5

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

blueprints/component-test/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ module.exports = useTestFrameworkDetector({
130130
selfCloseComponent,
131131
friendlyTestDescription,
132132
hbsImportStatement,
133+
pkgName: options.project.pkg.name,
133134
};
134135
},
135136

blueprints/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.gjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<% if (testType === 'integration') { %>import { module, test } from 'qunit';
22
import { setupRenderingTest } from '<%= modulePrefix %>/tests/helpers';
33
import { render } from '@ember/test-helpers';
4-
import <%= componentName %> from '<%= modulePrefix %>/components/<%= componentPathName %>';
4+
import <%= componentName %> from '<%= pkgName %>/components/<%= componentPathName %>';
55

66
module('<%= friendlyTestDescription %>', function (hooks) {
77
setupRenderingTest(hooks);

blueprints/component-test/qunit-rfc-232-files/__root__/__testType__/__path__/__test__.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<% if (testType === 'integration') { %>import { module, test } from 'qunit';
22
import { setupRenderingTest } from '<%= modulePrefix %>/tests/helpers';
33
import { render } from '@ember/test-helpers';
4-
import <%= componentName %> from '<%= modulePrefix %>/components/<%= componentPathName %>';
4+
import <%= componentName %> from '<%= pkgName %>/components/<%= componentPathName %>';
55

66
module('<%= friendlyTestDescription %>', function (hooks) {
77
setupRenderingTest(hooks);

node-tests/fixtures/component-test/addon.gjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { module, test } from 'qunit';
22
import { setupRenderingTest } from 'dummy/tests/helpers';
33
import { render } from '@ember/test-helpers';
4-
import Foo from 'dummy/components/foo';
4+
import Foo from 'my-addon/components/foo';
55

66
module('Integration | Component | foo', function (hooks) {
77
setupRenderingTest(hooks);

node-tests/fixtures/component-test/addon.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { module, test } from 'qunit';
22
import { setupRenderingTest } from 'dummy/tests/helpers';
33
import { render } from '@ember/test-helpers';
4-
import Foo from 'dummy/components/foo';
4+
import Foo from 'my-addon/components/foo';
55

66
module('Integration | Component | foo', function (hooks) {
77
setupRenderingTest(hooks);

0 commit comments

Comments
 (0)