Failing tests on the `main` branch
timrogers opened this issue · comments
There are currently two failing tests on the main
branch - at least on my machine.
The output is below:
> @actions/add-to-project@0.0.0 test
> jest
FAIL __tests__/add-to-project.test.ts
addToProject
✓ adds an issue to the project (2 ms)
✓ adds matching issues with a label filter without label-operator
✓ adds matching pull-requests with a label filter without label-operator
✓ does not add un-matching issues with a label filter without label-operator (1 ms)
✓ adds matching issues with labels filter with AND label-operator
✓ does not add un-matching issues with labels filter with AND label-operator
✓ does not add matching issues with labels filter with NOT label-operator
✕ adds issues that do not have labels present in the label list with NOT label-operator (1 ms)
✓ adds matching issues with multiple label filters
✓ does not add un-matching issues with multiple label filters
✓ handles spaces and extra commas gracefully in label filter input
✓ throws an error when url isn't a valid project url (5 ms)
✓ throws an error when url isn't under the github.com domain (1 ms)
✓ constructs the correct graphQL query given an organization owner
✓ constructs the correct graphQL query given a user owner
✕ compares labels case-insensitively
mustGetOwnerTypeQuery
✓ returns organization for orgs ownerType
✓ returns user for users ownerType
✓ throws an error when an unsupported ownerType is set (1 ms)
● addToProject › adds issues that do not have labels present in the label list with NOT label-operator
TypeError: Cannot read properties of undefined (reading 'id')
96 | )
97 |
> 98 | const projectId = idResp[ownerTypeQuery]?.projectV2.id
| ^
99 | const contentId = issue?.node_id
100 |
101 | core.debug(`Project node ID: ${projectId}`)
at src/add-to-project.ts:98:55
at fulfilled (src/add-to-project.ts:28:58)
● addToProject › compares labels case-insensitively
TypeError: Cannot read properties of undefined (reading 'id')
96 | )
97 |
> 98 | const projectId = idResp[ownerTypeQuery]?.projectV2.id
| ^
99 | const contentId = issue?.node_id
100 |
101 | core.debug(`Project node ID: ${projectId}`)
at src/add-to-project.ts:98:55
at fulfilled (src/add-to-project.ts:28:58)
Test Suites: 1 failed, 1 total
Tests: 2 failed, 17 passed, 19 total
Snapshots: 0 total
Time: 1.218 s, estimated 2 s
Ran all test suites.