Function
makeTest
(
fn: Circus.TestFn,
mode: Circus.TestMode,
concurrent: boolean,
name: Circus.TestName,
parent: Circus.DescribeBlock,
timeout: number | undefined,
asyncError: Circus.Exception,
failing: boolean,
)
Source from the content-addressed store, hash-verified
| 61 | }; |
| 62 | |
| 63 | export const makeTest = ( |
| 64 | fn: Circus.TestFn, |
| 65 | mode: Circus.TestMode, |
| 66 | concurrent: boolean, |
| 67 | name: Circus.TestName, |
| 68 | parent: Circus.DescribeBlock, |
| 69 | timeout: number | undefined, |
| 70 | asyncError: Circus.Exception, |
| 71 | failing: boolean, |
| 72 | ): Circus.TestEntry => ({ |
| 73 | type: 'test', // eslint-disable-next-line sort-keys |
| 74 | asyncError, |
| 75 | concurrent, |
| 76 | duration: null, |
| 77 | errors: [], |
| 78 | failing, |
| 79 | fn, |
| 80 | invocations: 0, |
| 81 | mode, |
| 82 | name: convertDescriptorToString(name), |
| 83 | numPassingAsserts: 0, |
| 84 | parent, |
| 85 | retryReasons: [], |
| 86 | seenDone: false, |
| 87 | startedAt: null, |
| 88 | status: null, |
| 89 | timeout, |
| 90 | unhandledRejectionErrorByPromise: new Map(), |
| 91 | }); |
| 92 | |
| 93 | // Traverse the tree of describe blocks and return true if at least one describe |
| 94 | // block has an enabled test. |