MCPcopy
hub / github.com/jestjs/jest / then

Method then

packages/jest-jasmine2/src/PCancelable.ts:50–61  ·  view source on GitHub ↗
(
    onFulfilled?:
      | ((value: T) => TResult1 | PromiseLike<TResult1>)
      | undefined
      | null,
    onRejected?:
      | ((reason: unknown) => TResult2 | PromiseLike<TResult2>)
      | undefined
      | null,
  )

Source from the content-addressed store, hash-verified

48
49 // eslint-disable-next-line unicorn/no-thenable
50 then<TResult1 = T, TResult2 = never>(
51 onFulfilled?:
52 | ((value: T) => TResult1 | PromiseLike<TResult1>)
53 | undefined
54 | null,
55 onRejected?:
56 | ((reason: unknown) => TResult2 | PromiseLike<TResult2>)
57 | undefined
58 | null,
59 ): Promise<TResult1 | TResult2> {
60 return this._promise.then(onFulfilled, onRejected);
61 }
62
63 catch<TResult>(
64 onRejected?:

Callers 15

doneFunction · 0.80
callAsyncCircusFnFunction · 0.80
asyncError.test.tsFile · 0.80
onKeypressFunction · 0.80
testWorkerFarmFunction · 0.80
testJestWorkerFunction · 0.80
execFunctionFunction · 0.80
forceExitMethod · 0.80
constructorFunction · 0.80
execFunctionFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected