@@ -159,6 +159,7 @@ describe('tools', () => {
159
159
test ( 'get next project cost for paid org with 0 projects' , async ( ) => {
160
160
const { callTool } = await setup ( ) ;
161
161
162
+ mockProjects . clear ( ) ;
162
163
const paidOrg = mockOrgs . find ( ( org ) => org . plan !== 'free' ) ! ;
163
164
const result = await callTool ( {
164
165
name : 'get_cost' ,
@@ -173,18 +174,11 @@ describe('tools', () => {
173
174
) ;
174
175
} ) ;
175
176
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 ( ) => {
177
178
const { callTool } = await setup ( ) ;
178
179
179
180
const paidOrg = mockOrgs . find ( ( org ) => org . plan !== 'free' ) ! ;
180
181
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
-
188
182
const result = await callTool ( {
189
183
name : 'get_cost' ,
190
184
arguments : {
@@ -198,17 +192,13 @@ describe('tools', () => {
198
192
) ;
199
193
} ) ;
200
194
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 ( ) => {
202
196
const { callTool } = await setup ( ) ;
203
197
204
198
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
+ }
212
202
213
203
const result = await callTool ( {
214
204
name : 'get_cost' ,
0 commit comments