MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / have

Method have

lib/helper/ApiDataFactory.js:285–289  ·  view source on GitHub ↗

* Generates a new record using factory and saves API request to store it. * * ```js * // create a user * I.have('user'); * // create user with defined email * // and receive it when inside async function * const user = await I.have('user', { email: 'user@user.com'}); * // cre

(factory, params, options)

Source from the content-addressed store, hash-verified

283 * @returns {Promise<*>}
284 */
285 async have(factory, params, options) {
286 const item = await this._createItem(factory, params, options)
287 this.debug(`Creating ${factory} ${JSON.stringify(item)}`)
288 return this._requestCreate(factory, item)
289 }
290
291 /**
292 * Generates bunch of records and saves multiple API requests to store them.

Callers 2

haveMultipleMethod · 0.95

Calls 3

_createItemMethod · 0.95
_requestCreateMethod · 0.95
debugMethod · 0.80

Tested by

no test coverage detected