@@ -15,6 +15,7 @@ import Engine, { getEngineParent } from '@ember/engine';
15
15
16
16
import { backtrackingMessageFor } from '../utils/debug-stack' ;
17
17
import { compile , Component } from '../utils/helpers' ;
18
+ import { setComponentTemplate } from '@glimmer/manager' ;
18
19
19
20
moduleFor (
20
21
'{{mount}} single param assertion' ,
@@ -142,19 +143,23 @@ moduleFor(
142
143
} ,
143
144
} ) ;
144
145
145
- this . engineRegistrations [ 'template:components/component-with-backtracking-set' ] = compile (
146
- '[component {{this.person.name}}]' ,
147
- {
148
- moduleName : 'my-app/templates/components/component-with-backtracking-set.hbs' ,
149
- }
150
- ) ;
151
- this . engineRegistrations [ 'component:component-with-backtracking-set' ] = Component . extend ( {
146
+ let ComponentWithBacktrackingSet = Component . extend ( {
152
147
init ( ) {
153
148
this . _super ( ...arguments ) ;
154
149
this . set ( 'person.name' , 'Ben' ) ;
155
150
} ,
156
151
} ) ;
157
152
153
+ setComponentTemplate (
154
+ compile ( '[component {{this.person.name}}]' , {
155
+ moduleName : 'my-app/templates/components/component-with-backtracking-set.hbs' ,
156
+ } ) ,
157
+ ComponentWithBacktrackingSet
158
+ ) ;
159
+
160
+ this . engineRegistrations [ 'component:component-with-backtracking-set' ] =
161
+ ComponentWithBacktrackingSet ;
162
+
158
163
let expectedBacktrackingMessage = backtrackingMessageFor ( 'name' , 'Person \\(Ben\\)' , {
159
164
renderTree : [ 'application' , 'route-with-mount' , 'chat' , 'this.person.name' ] ,
160
165
} ) ;
0 commit comments