UNPKG

codeceptjs

Version:

Modern Era Acceptance Testing Framework for NodeJS

64 lines (35 loc) 1.18 kB
<!-- Generated by documentation.js. Update this documentation by updating the source code. --> ## recorder Singleton object to record all test steps as promises and run them in chain. ### add Adds a promise to a chain. Promise description should be passed as first parameter. #### Parameters - `taskName` **any** - `fn` **any** (optional, default `undefined`) - `force` **any** (optional, default `false`) - `retry` **[boolean][1]** true: it will retries if `retryOpts` set. false: ignore `retryOpts` and won't retry. (optional, default `true`) ### errHandler Add error handler to catch rejected promises #### Parameters - `fn` **any** ### promise Get latest promise in chain. ### reset Stops current promise chain, calls `catch`. Resets recorder to initial state. ### retries ### scheduled Get a list of all chained tasks ### start Start recording promises ### stop Stops recording promises ### throw Adds a promise which throws an error into a chain #### Parameters - `err` **any** ### toString Get a state of current queue and tasks [1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean