11import { DEBUG } from '@glimmer/env' ;
22import { moduleFor , RenderingTestCase , applyMixins , strip , runTask } from 'internal-test-helpers' ;
33
4- import { isEmpty } from '@ember/utils' ;
54import { action } from '@ember/object' ;
65import { A as emberA } from '@ember/array' ;
76
@@ -956,35 +955,35 @@ moduleFor(
956955 }
957956 ) ;
958957
959- assert . ok ( ! isEmpty ( instance ) , 'a instance was created' ) ;
958+ assert . ok ( instance , 'the component instance exinstance was created' ) ;
960959 assert . equal ( previousInstance , undefined , 'no previous component exists' ) ;
961960 assert . equal ( initCount , 1 , 'the component was constructed exactly 1 time' ) ;
962961 assert . equal ( this . $ ( ) . text ( ) , 'open' , 'the components text is "open"' ) ;
963962
964963 runTask ( ( ) => this . rerender ( ) ) ;
965964
966- assert . ok ( ! isEmpty ( instance ) , 'the component instance exists' ) ;
965+ assert . ok ( instance , 'the component instance exists' ) ;
967966 assert . equal ( previousInstance , undefined , 'no previous component exists' ) ;
968967 assert . equal ( initCount , 1 , 'the component was constructed exactly 1 time' ) ;
969968 assert . equal ( this . $ ( ) . text ( ) , 'open' , 'the components text is "open"' ) ;
970969
971970 runTask ( ( ) => this . context . set ( 'isOpen' , false ) ) ;
972971
973- assert . ok ( ! isEmpty ( instance ) , 'the component instance exists' ) ;
972+ assert . ok ( instance , 'the component instance exists' ) ;
974973 assert . equal ( previousInstance , undefined , 'no previous component exists' ) ;
975974 assert . equal ( initCount , 1 , 'the component was constructed exactly 1 time' ) ;
976975 assert . equal ( this . $ ( ) . text ( ) , 'closed' , 'the component text is "closed"' ) ;
977976
978977 runTask ( ( ) => this . rerender ( ) ) ;
979978
980- assert . ok ( ! isEmpty ( instance ) , 'the component instance exists' ) ;
979+ assert . ok ( instance , 'the component instance exists' ) ;
981980 assert . equal ( previousInstance , undefined , 'no previous component exists' ) ;
982981 assert . equal ( initCount , 1 , 'the component was constructed exactly 1 time' ) ;
983982 assert . equal ( this . $ ( ) . text ( ) , 'closed' , 'the component text is "closed"' ) ;
984983
985984 runTask ( ( ) => this . context . set ( 'isOpen' , true ) ) ;
986985
987- assert . ok ( ! isEmpty ( instance ) , 'the component instance exists' ) ;
986+ assert . ok ( instance , 'the component instance exists' ) ;
988987 assert . equal ( previousInstance , undefined , 'no previous component exists' ) ;
989988 assert . equal ( initCount , 1 , 'the component was constructed exactly 1 time' ) ;
990989 assert . equal ( this . $ ( ) . text ( ) , 'open' , 'the components text is "open"' ) ;
@@ -1021,35 +1020,35 @@ moduleFor(
10211020 }
10221021 ) ;
10231022
1024- assert . ok ( ! isEmpty ( instance ) , 'a instance was created' ) ;
1023+ assert . ok ( instance , 'a instance was created' ) ;
10251024 assert . equal ( previousInstance , undefined , 'no previous component exists' ) ;
10261025 assert . equal ( initCount , 1 , 'the component was constructed exactly 1 time' ) ;
10271026 assert . equal ( this . $ ( ) . text ( ) , 'open' , 'the components text is "open"' ) ;
10281027
10291028 runTask ( ( ) => this . rerender ( ) ) ;
10301029
1031- assert . ok ( ! isEmpty ( instance ) , 'the component instance exists' ) ;
1030+ assert . ok ( instance , 'the component instance exists' ) ;
10321031 assert . equal ( previousInstance , undefined , 'no previous component exists' ) ;
10331032 assert . equal ( initCount , 1 , 'the component was constructed exactly 1 time' ) ;
10341033 assert . equal ( this . $ ( ) . text ( ) , 'open' , 'the components text is "open"' ) ;
10351034
10361035 runTask ( ( ) => this . context . set ( 'isOpen' , false ) ) ;
10371036
1038- assert . ok ( ! isEmpty ( instance ) , 'the component instance exists' ) ;
1037+ assert . ok ( instance , 'the component instance exists' ) ;
10391038 assert . equal ( previousInstance , undefined , 'no previous component exists' ) ;
10401039 assert . equal ( initCount , 1 , 'the component was constructed exactly 1 time' ) ;
10411040 assert . equal ( this . $ ( ) . text ( ) , 'closed' , 'the component text is "closed"' ) ;
10421041
10431042 runTask ( ( ) => this . rerender ( ) ) ;
10441043
1045- assert . ok ( ! isEmpty ( instance ) , 'the component instance exists' ) ;
1044+ assert . ok ( instance , 'the component instance exists' ) ;
10461045 assert . equal ( previousInstance , undefined , 'no previous component exists' ) ;
10471046 assert . equal ( initCount , 1 , 'the component was constructed exactly 1 time' ) ;
10481047 assert . equal ( this . $ ( ) . text ( ) , 'closed' , 'the component text is "closed"' ) ;
10491048
10501049 runTask ( ( ) => this . context . set ( 'isOpen' , true ) ) ;
10511050
1052- assert . ok ( ! isEmpty ( instance ) , 'the component instance exists' ) ;
1051+ assert . ok ( instance , 'the component instance exists' ) ;
10531052 assert . equal ( previousInstance , undefined , 'no previous component exists' ) ;
10541053 assert . equal ( initCount , 1 , 'the component was constructed exactly 1 time' ) ;
10551054 assert . equal ( this . $ ( ) . text ( ) , 'open' , 'the components text is "open"' ) ;
@@ -1099,22 +1098,22 @@ moduleFor(
10991098 }
11001099 ) ;
11011100
1102- assert . ok ( ! isEmpty ( instance ) , 'a instance was created' ) ;
1101+ assert . ok ( instance , 'a instance was created' ) ;
11031102 assert . equal ( previousInstance , undefined , 'there is no previous instance' ) ;
11041103 assert . equal ( initCount , 1 , 'the component was constructed exactly 1 time' ) ;
11051104 assert . equal ( this . $ ( ) . text ( ) , 'my-comp: open' ) ;
11061105
11071106 runTask ( ( ) => this . rerender ( ) ) ;
11081107
1109- assert . ok ( ! isEmpty ( instance ) , 'a instance exists after rerender' ) ;
1108+ assert . ok ( instance , 'a instance exists after rerender' ) ;
11101109 assert . equal ( previousInstance , undefined , 'there is no previous instance after rerender' ) ;
11111110 assert . equal ( initCount , 1 , 'the component was constructed exactly 1 time' ) ;
11121111 assert . equal ( this . $ ( ) . text ( ) , 'my-comp: open' ) ;
11131112
11141113 runTask ( ( ) => this . context . set ( 'compName' , 'your-comp' ) ) ;
11151114
1116- assert . ok ( ! isEmpty ( instance ) , 'an instance was created after component name changed' ) ;
1117- assert . ok ( ! isEmpty ( previousInstance ) , 'a previous instance now exists' ) ;
1115+ assert . ok ( instance , 'an instance was created after component name changed' ) ;
1116+ assert . ok ( previousInstance , 'a previous instance now exists' ) ;
11181117 assert . notEqual (
11191118 instance ,
11201119 previousInstance ,
@@ -1125,11 +1124,8 @@ moduleFor(
11251124
11261125 runTask ( ( ) => this . rerender ( ) ) ;
11271126
1128- assert . ok (
1129- ! isEmpty ( instance ) ,
1130- 'an instance was created after component name changed (rerender)'
1131- ) ;
1132- assert . ok ( ! isEmpty ( previousInstance ) , 'a previous instance now exists (rerender)' ) ;
1127+ assert . ok ( instance , 'an instance was created after component name changed (rerender)' ) ;
1128+ assert . ok ( previousInstance , 'a previous instance now exists (rerender)' ) ;
11331129 assert . notEqual (
11341130 instance ,
11351131 previousInstance ,
@@ -1140,8 +1136,8 @@ moduleFor(
11401136
11411137 runTask ( ( ) => this . context . set ( 'compName' , 'my-comp' ) ) ;
11421138
1143- assert . ok ( ! isEmpty ( instance ) , 'an instance was created after component name changed' ) ;
1144- assert . ok ( ! isEmpty ( previousInstance ) , 'a previous instance still exists' ) ;
1139+ assert . ok ( instance , 'an instance was created after component name changed' ) ;
1140+ assert . ok ( previousInstance , 'a previous instance still exists' ) ;
11451141 assert . notEqual (
11461142 instance ,
11471143 previousInstance ,
0 commit comments