@@ -25,6 +25,11 @@ ruleTester.run('template-no-outlet-outside-routes', rule, {
2525 filename : 'app/routes/foo.gts' ,
2626 code : '<template>{{outlet}}</template>' ,
2727 } ,
28+ // Block form in GJS route templates — outlet is allowed
29+ {
30+ filename : 'app/routes/foo.gjs' ,
31+ code : '<template>{{#outlet}}content{{/outlet}}</template>' ,
32+ } ,
2833 ] ,
2934 invalid : [
3035 // Co-located component (explicit filename)
@@ -46,6 +51,13 @@ ruleTester.run('template-no-outlet-outside-routes', rule, {
4651 output : null ,
4752 errors : [ { messageId : 'noOutletOutsideRoutes' } ] ,
4853 } ,
54+ // Block form in component
55+ {
56+ filename : 'app/components/my-component.gjs' ,
57+ code : '<template>{{#outlet}}content{{/outlet}}</template>' ,
58+ output : null ,
59+ errors : [ { messageId : 'noOutletOutsideRoutes' } ] ,
60+ } ,
4961 ] ,
5062} ) ;
5163
@@ -120,5 +132,12 @@ hbsRuleTester.run('template-no-outlet-outside-routes', rule, {
120132 output : null ,
121133 errors : [ { messageId : 'noOutletOutsideRoutes' } ] ,
122134 } ,
135+ // Block form in component template
136+ {
137+ filename : 'app/components/foo/layout.hbs' ,
138+ code : '{{#outlet}}content{{/outlet}}' ,
139+ output : null ,
140+ errors : [ { messageId : 'noOutletOutsideRoutes' } ] ,
141+ } ,
123142 ] ,
124143} ) ;
0 commit comments