* 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)
| 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. |
no test coverage detected