@@ -15,7 +15,6 @@ import {
1515} from '@ember/test-helpers' ;
1616import templateOnly from '@ember/component/template-only' ;
1717
18- import hasEmberVersion from '@ember/test-helpers/has-ember-version' ;
1918import { setResolverRegistry } from '../helpers/resolver' ;
2019import { hbs } from 'ember-cli-htmlbars' ;
2120import { precompileTemplate } from '@ember/template-compilation' ;
@@ -143,60 +142,56 @@ module('setupRenderingContext "real world"', function (hooks) {
143142 } ) ;
144143
145144 module ( 'lexical scope access' , function ( ) {
146- if ( hasEmberVersion ( 3 , 28 ) ) {
147- test ( 'can render components passed as locals' , async function ( assert ) {
148- let add = helper ( function ( [ first , second ] ) {
149- return first + second ;
150- } ) ;
151-
152- await render (
153- precompileTemplate ( '{{add 1 3}}' , {
154- scope ( ) {
155- return { add } ;
156- } ,
157- } )
158- ) ;
159-
160- assert . equal ( this . element . textContent , '4' ) ;
145+ test ( 'can render components passed as locals' , async function ( assert ) {
146+ let add = helper ( function ( [ first , second ] ) {
147+ return first + second ;
161148 } ) ;
162- }
149+
150+ await render (
151+ precompileTemplate ( '{{add 1 3}}' , {
152+ scope ( ) {
153+ return { add } ;
154+ } ,
155+ } )
156+ ) ;
157+
158+ assert . equal ( this . element . textContent , '4' ) ;
159+ } ) ;
163160 } ) ;
164161
165162 module ( 'render with a component' , function ( ) {
166- if ( hasEmberVersion ( 3 , 25 ) ) {
167- test ( 'can render locally defined components' , async function ( assert ) {
168- class MyComponent extends GlimmerComponent { }
163+ test ( 'can render locally defined components' , async function ( assert ) {
164+ class MyComponent extends GlimmerComponent { }
169165
170- setComponentTemplate ( hbs `my name is {{@name}}` , MyComponent ) ;
166+ setComponentTemplate ( hbs `my name is {{@name}}` , MyComponent ) ;
171167
172- const somePerson = new ( class {
173- @tracked name = 'Zoey' ;
174- } ) ( ) ;
168+ const somePerson = new ( class {
169+ @tracked name = 'Zoey' ;
170+ } ) ( ) ;
175171
176- const template = precompileTemplate (
177- '<MyComponent @name={{somePerson.name}} />' ,
178- {
179- scope ( ) {
180- return {
181- somePerson,
182- MyComponent,
183- } ;
184- } ,
185- }
186- ) ;
172+ const template = precompileTemplate (
173+ '<MyComponent @name={{somePerson.name}} />' ,
174+ {
175+ scope ( ) {
176+ return {
177+ somePerson,
178+ MyComponent,
179+ } ;
180+ } ,
181+ }
182+ ) ;
187183
188- const component = setComponentTemplate ( template , templateOnly ( ) ) ;
184+ const component = setComponentTemplate ( template , templateOnly ( ) ) ;
189185
190- await render ( component ) ;
186+ await render ( component ) ;
191187
192- assert . equal ( this . element . textContent , 'my name is Zoey' ) ;
188+ assert . equal ( this . element . textContent , 'my name is Zoey' ) ;
193189
194- somePerson . name = 'Tomster' ;
190+ somePerson . name = 'Tomster' ;
195191
196- await rerender ( ) ;
192+ await rerender ( ) ;
197193
198- assert . equal ( this . element . textContent , 'my name is Tomster' ) ;
199- } ) ;
200- }
194+ assert . equal ( this . element . textContent , 'my name is Tomster' ) ;
195+ } ) ;
201196 } ) ;
202197} ) ;
0 commit comments