您最多选择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. }