aws / aws/graph-explorer

Add assertion messages to .toThrow() calls to unblock oxlint 1.70 upgrade

Closed
#1,850 1 comment 0 reactions 1 assignee Claimed by @kmcginnes View on GitHub
infrastructure internal tech debt
Dominant language
TypeScript
Stars
481
Forks
108
Avg merge
6d 8h
Merged PRs (30d)
5

Description

oxlint 1.70 enables `vitest/require-to-throw-message` by default, which flags 24 pre-existing `.toThrow()` / `.rejects.toThrow()` calls that assert no message. The oxlint bump was held at 1.62.0 in the latest dependency update so this surfaced separately rather than blocking routine bumps.

Add a matcher argument (string or regex) to each call so the assertions verify *which* error is thrown, then bump oxlint to 1.70+ (currently latest) and drop the hold.

## Affected files (24 sites)

| File | Count |
| --- | --- |
| `packages/graph-explorer/src/connector/sparql/parseAndMapQuads.test.ts` | 11 |
| `packages/graph-explorer/src/connector/sparql/fetchNeighbors/index.test.ts` | 4 |
| `packages/graph-explorer/src/connector/queries/edgeConnectionsQuery.test.ts` | 3 |
| `packages/graph-explorer/src/connector/queries/schemaSyncQuery.test.ts` | 1 |
| `packages/graph-explorer/src/connector/sparql/neighborCounts.test.ts` | 1 |
| `packages/graph-explorer/src/connector/sparql/rawQuery.test.ts` | 1 |
| `packages/graph-explorer/src/connector/fetchDatabaseRequest.test.ts` | 1 |
| `packages/graph-explorer/src/core/StateProvider/localDb.test.ts` | 1 |
| `packages/graph-explorer-proxy-server/src/server.test.ts` | 1 |

## Done when

- Every flagged `.toThrow()` asserts a specific message/pattern
- oxlint bumped to 1.70+ and the 1.62.0 hold removed from root `package.json`
- `pnpm run checks` passes

Related: #1753 (enabling other disabled oxlint rules)

> [!IMPORTANT]
> Internal only — this issue is maintained by the core team and is not accepting external contributions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.