MCPcopy
hub / github.com/forwardemail/supertest / _assertFunction

Method _assertFunction

lib/test.js:339–347  ·  view source on GitHub ↗
(fn, res)

Source from the content-addressed store, hash-verified

337 * @api private
338 */// eslint-disable-next-line class-methods-use-this
339 _assertFunction(fn, res) {
340 let err;
341 try {
342 err = fn(res);
343 } catch (e) {
344 err = e;
345 }
346 if (err instanceof Error) return err;
347 }
348}
349
350/**

Callers 2

assertMethod · 0.95
supertest.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected