Files
radicle-explorer/explorer/http-client/tests/support/support.ts
T
Rūdolfs Ošiņš e37521c739 Move explorer into explorer/
Makes explorer and desktop sibling projects, as proposed in ADR 1.
This commit only moves files; paths in CI, scripts and docs are fixed
in the following commits.
2026-10-22 11:06:33 +02:00

29 lines
718 B
TypeScript

import type { HttpdClient } from "@http-client";
import { expect } from "vitest";
import isMatch from "lodash/isMatch";
import { cobRid } from "@tests/support/fixtures";
export async function assertIssue(
oid: string,
change: Record<string, unknown>,
api: HttpdClient,
) {
expect(
//@prettier-ignore looks more readable than what prettier suggests.
isMatch(await api.repo.getIssueById(cobRid, oid), change),
).toBe(true);
}
export async function assertPatch(
oid: string,
change: Record<string, unknown>,
api: HttpdClient,
) {
expect(
//@prettier-ignore looks more readable than what prettier suggests.
isMatch(await api.repo.getPatchById(cobRid, oid), change),
).toBe(true);
}