INNER CODE UNIT · TypeScript
assertResultField
github/branch-deploy · tools/acceptance/index.ts:241
function assertResultField(
context: ScenarioContext,
result: AcceptanceRunResult,
key: string,
expected: unknown
): void {
const parsed: unknown = JSON.parse(requireOutput(context, result, 'result'))
assert.ok(isRecord(parsed), diagnostics(context, result))
assert.deepEqual(parsed[key], expected, diagnostics(context, result))
}
function assertCommentIncludes(
context: ScenarioContext,
fragment: string
): void {
const matched = context.state.comments.some(comment =>
comment.body.includes(fragment)
)