Skip to content

Commit a3ed935

Browse files
committed
Updates cache test with conditional PR check
1 parent 61e262c commit a3ed935

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/site-with-errors.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@ describe('site-with-errors', () => {
6767
})
6868

6969
it('cache has expected results', () => {
70-
const actual = results.map(({issue: {url: issueUrl}, pullRequest: {url: pullRequestUrl}, findings}) => {
70+
const actual = results.map(({issue: {url: issueUrl}, pullRequest, findings}) => {
7171
const {problemUrl, solutionLong, screenshotId, ...finding} = findings[0]
7272
// Check volatile fields for existence only
7373
expect(issueUrl).toBeDefined()
74-
expect(pullRequestUrl).toBeDefined()
74+
if (WAIT_FOR_PULL_REQUESTS) {
75+
expect(pullRequest?.url).toBeDefined()
76+
}
7577
expect(problemUrl).toBeDefined()
7678
expect(solutionLong).toBeDefined()
7779
// Check `problemUrl`, ignoring axe version

0 commit comments

Comments
 (0)