feat: plugin contract e2e, qualify --changed, production observe, regressions
This commit is contained in:
@@ -179,11 +179,13 @@ const makeConditionFailure = (
|
||||
const expected = fieldExpectation?.expected ?? statusExpectation.expected
|
||||
const actual = fieldExpectation?.actual ?? statusExpectation.actual
|
||||
const diff = buildDiff(formula, ctx.response.body)
|
||||
const source = (route as RouteContract | undefined)?.formulaSources?.[formula]
|
||||
|
||||
return makeViolation({
|
||||
route: route ?? { method: '', path: '' },
|
||||
formula,
|
||||
kind,
|
||||
...(source ? { source, phase: 'postcondition' } : {}),
|
||||
request: {
|
||||
body: ctx.request.body,
|
||||
headers: ctx.request.headers,
|
||||
@@ -206,10 +208,12 @@ const makeFormulaError = (
|
||||
route: RouteContract | { method: string; path: string } | undefined,
|
||||
message: string
|
||||
): ContractViolation => {
|
||||
const source = (route as RouteContract | undefined)?.formulaSources?.[formula]
|
||||
return makeViolation({
|
||||
route: route ?? { method: '', path: '' },
|
||||
formula,
|
||||
kind,
|
||||
...(source ? { source, phase: 'postcondition' } : {}),
|
||||
request: {
|
||||
body: ctx.request.body,
|
||||
headers: ctx.request.headers,
|
||||
|
||||
Reference in New Issue
Block a user