選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

TestUtils.js 417B

123456789101112
  1. /* global process */
  2. /**
  3. * Returns a Promise resolved after {@code process.nextTick} with the option to advance Jasmine timers.
  4. *
  5. * @param {number} [advanceTimer] - the value to be passed to Jasmine clock's tick method.
  6. * @returns {Promise<void>}
  7. */
  8. export function nextTick(advanceTimer) {
  9. advanceTimer && jasmine.clock().tick(advanceTimer);
  10. return new Promise(resolve => process.nextTick(resolve));
  11. }