Skip to content

Commit 3a52507

Browse files
author
Robert Jackson
authored
Merge pull request #335 from camerondubas/master
Add additional tests for Colocated Components
2 parents 29bbbba + 70a03f7 commit 3a52507

4 files changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Module: {{module-name-inliner}}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Module: {{module-name-inliner}}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Module: {{module-name-inliner}}

tests/integration/components/colocation-test.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,22 @@ module('tests/integration/components/test-inline-precompile', function(hooks) {
1717

1818
assert.equal(this.element.textContent.trim(), 'Module: dummy/components/foo.hbs');
1919
});
20+
21+
test('registered ast plugins run against nested colocated templates (template-only)', async function(assert) {
22+
await render(hbs`<Foo::Bar />`);
23+
24+
assert.equal(this.element.textContent.trim(), 'Module: dummy/components/foo/bar.hbs');
25+
});
26+
27+
test('registered ast plugins run against colocated template index files (template-only)', async function(assert) {
28+
await render(hbs`<Baz />`);
29+
30+
assert.equal(this.element.textContent.trim(), 'Module: dummy/components/baz/index.hbs');
31+
});
32+
33+
test('registered ast plugins run against nested colocated template index files (template-only)', async function(assert) {
34+
await render(hbs`<Foo::Baz />`);
35+
36+
assert.equal(this.element.textContent.trim(), 'Module: dummy/components/foo/baz/index.hbs');
37+
});
2038
});

0 commit comments

Comments
 (0)