@@ -159,6 +159,7 @@ describe('tools', () => {
159159 test ( 'get next project cost for paid org with 0 projects' , async ( ) => {
160160 const { callTool } = await setup ( ) ;
161161
162+ mockProjects . clear ( ) ;
162163 const paidOrg = mockOrgs . find ( ( org ) => org . plan !== 'free' ) ! ;
163164 const result = await callTool ( {
164165 name : 'get_cost' ,
@@ -173,18 +174,11 @@ describe('tools', () => {
173174 ) ;
174175 } ) ;
175176
176- test ( 'get next project cost for paid org with > 0 ACTIVE_HEALTHY projects' , async ( ) => {
177+ test ( 'get next project cost for paid org with > 0 active projects' , async ( ) => {
177178 const { callTool } = await setup ( ) ;
178179
179180 const paidOrg = mockOrgs . find ( ( org ) => org . plan !== 'free' ) ! ;
180181
181- const priorProject = await createProject ( {
182- name : 'Project 1' ,
183- region : 'us-east-1' ,
184- organization_id : paidOrg . id ,
185- } ) ;
186- priorProject . status = 'ACTIVE_HEALTHY' ;
187-
188182 const result = await callTool ( {
189183 name : 'get_cost' ,
190184 arguments : {
@@ -198,17 +192,13 @@ describe('tools', () => {
198192 ) ;
199193 } ) ;
200194
201- test ( 'get next project cost for paid org with > 0 projects that are not ACTIVE_HEALTHY ' , async ( ) => {
195+ test ( 'get next project cost for paid org with > 0 inactive projects ' , async ( ) => {
202196 const { callTool } = await setup ( ) ;
203197
204198 const paidOrg = mockOrgs . find ( ( org ) => org . plan !== 'free' ) ! ;
205-
206- const priorProject = await createProject ( {
207- name : 'Project 1' ,
208- region : 'us-east-1' ,
209- organization_id : paidOrg . id ,
210- } ) ;
211- priorProject . status = 'INACTIVE' ;
199+ for ( const priorProject of mockProjects . values ( ) ) {
200+ priorProject . status = 'INACTIVE' ;
201+ }
212202
213203 const result = await callTool ( {
214204 name : 'get_cost' ,
0 commit comments