@@ -192,7 +192,7 @@ describe('pageBuilder', () => {
192192
193193 await buildOpenAPIPages ( testEntries , testOptions ) ;
194194
195- expect ( mockExecute ) . toBeCalledTimes ( testEntries . length * 2 ) ;
195+ expect ( mockExecute ) . toBeCalledTimes ( 4 ) ;
196196 // Local
197197 expect ( mockExecute ) . toBeCalledWith (
198198 `${ testOptions . repo } /source${ testEntries [ 0 ] [ 1 ] . source } ` ,
@@ -201,12 +201,6 @@ describe('pageBuilder', () => {
201201 getExpectedVersionOptions ( `${ SITE_URL } /${ testEntries [ 0 ] [ 0 ] } ` )
202202 ) ;
203203
204- expect ( mockExecute ) . toBeCalledWith (
205- `${ testOptions . repo } /source${ testEntries [ 0 ] [ 1 ] . source } ` ,
206- `${ testOptions . output } /${ testEntries [ 0 ] [ 0 ] } /index.html` ,
207- expectedDefaultBuildOptions ,
208- getExpectedVersionOptions ( `${ SITE_URL } /${ testEntries [ 0 ] [ 0 ] } ` )
209- ) ;
210204 // Url
211205 expect ( mockExecute ) . toBeCalledWith (
212206 `${ testEntries [ 1 ] [ 1 ] . source } ` ,
@@ -215,12 +209,6 @@ describe('pageBuilder', () => {
215209 getExpectedVersionOptions ( `${ SITE_URL } /${ testEntries [ 1 ] [ 0 ] } ` )
216210 ) ;
217211
218- expect ( mockExecute ) . toBeCalledWith (
219- `${ testEntries [ 1 ] [ 1 ] . source } ` ,
220- getExpectedOutputPath ( testOptions . output , testEntries [ 1 ] [ 0 ] , API_VERSION ) ,
221- expectedDefaultBuildOptions ,
222- getExpectedVersionOptions ( `${ SITE_URL } /${ testEntries [ 1 ] [ 0 ] } ` )
223- ) ;
224212 // Atlas
225213 expect ( mockExecute ) . toBeCalledWith (
226214 `https://mongodb-mms-prod-build-server.s3.amazonaws.com/openapi/${ MOCKED_GIT_HASH } -v2-${ RESOURCE_VERSION } .json` ,
@@ -230,8 +218,8 @@ describe('pageBuilder', () => {
230218 ) ;
231219
232220 expect ( mockExecute ) . toBeCalledWith (
233- `https://mongodb-mms-prod-build-server.s3.amazonaws.com/openapi/${ MOCKED_GIT_HASH } -v2.json` ,
234- getExpectedOutputPath ( testOptions . output , testEntries [ 2 ] [ 0 ] , API_VERSION ) ,
221+ `https://mongodb-mms-prod-build-server.s3.amazonaws.com/openapi/${ MOCKED_GIT_HASH } -v2- ${ RESOURCE_VERSION } .json` ,
222+ getExpectedOutputPath ( testOptions . output , testEntries [ 2 ] [ 0 ] , API_VERSION , RESOURCE_VERSION ) ,
235223 expectedAtlasBuildOptions ,
236224 getExpectedVersionOptions ( `${ SITE_URL } /${ testEntries [ 2 ] [ 0 ] } ` )
237225 ) ;
@@ -280,8 +268,8 @@ describe('pageBuilder', () => {
280268 ) ;
281269
282270 expect ( mockExecute ) . toBeCalledWith (
283- `https://mongodb-mms-prod-build-server.s3.amazonaws.com/openapi/${ MOCKED_GIT_HASH } -v2.json` ,
284- getExpectedOutputPath ( testOptions . output , testEntries [ 0 ] [ 0 ] , API_VERSION ) ,
271+ `https://mongodb-mms-prod-build-server.s3.amazonaws.com/openapi/${ MOCKED_GIT_HASH } -v2- ${ LATEST_RESOURCE_VERSION } .json` ,
272+ getExpectedOutputPath ( testOptions . output , testEntries [ 0 ] [ 0 ] , API_VERSION , LATEST_RESOURCE_VERSION ) ,
285273 expectedAtlasBuildOptions ,
286274 getExpectedVersionOptions ( `${ SITE_URL } /${ testEntries [ 0 ] [ 0 ] } ` , LATEST_RESOURCE_VERSION )
287275 ) ;
0 commit comments