MCPcopy Index your code
hub / github.com/gavv/httpexpect / setHandler

Method setHandler

chain.go:277–287  ·  view source on GitHub ↗

Set assertion handler Chain always overrides assertion handler with given one.

(handler AssertionHandler)

Source from the content-addressed store, hash-verified

275// Set assertion handler
276// Chain always overrides assertion handler with given one.
277func (c *chain) setHandler(handler AssertionHandler) {
278 c.mu.Lock()
279 defer c.mu.Unlock()
280
281 if chainValidation && c.state == stateLeaved {
282 panic("can't use chain after leave")
283 }
284
285 c.handler = handler
286 c.context.TestingTB = isTestingTB(handler)
287}
288
289// Create chain clone.
290// Typically is called between enter() and leave().

Callers 2

WithReporterMethod · 0.80
WithAssertionHandlerMethod · 0.80

Calls 3

isTestingTBFunction · 0.85
LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected