Skip to content

Commit 73e4990

Browse files
test: use Sinon stubs; parallel slug checksums (#3650)
restoring parallel slug checksums and replacing flaky nock HTTP mocks with Sinon stubs on APIClient
1 parent 8c4f8c3 commit 73e4990

2 files changed

Lines changed: 304 additions & 123 deletions

File tree

src/commands/apps/diff.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ async function checksum(heroku: APIClient, app: string): Promise<string | null>
4545
}
4646

4747
async function diffFiles(heroku: APIClient, app1: string, app2: string): Promise<DiffRow[]> {
48-
const sum1 = await checksum(heroku, app1)
49-
const sum2 = await checksum(heroku, app2)
50-
return sum1 === sum2 ? [] : [{prop: 'slug (checksum)', app1: sum1 ?? undefined, app2: sum2 ?? undefined}]
48+
const sums = await Promise.all([checksum(heroku, app1), checksum(heroku, app2)])
49+
return sums[0] === sums[1] ? [] : [{prop: 'slug (checksum)', app1: sums[0] ?? undefined, app2: sums[1] ?? undefined}]
5150
}
5251

5352
async function diffEnv(heroku: APIClient, app1: string, app2: string): Promise<DiffRow[]> {

0 commit comments

Comments
 (0)