您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

TestUtils.ts 459B

1234567891011121314
  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?: number): Promise<void> {
  9. if (advanceTimer) {
  10. jasmine.clock().tick(advanceTimer);
  11. }
  12. return new Promise(resolve => process.nextTick(resolve));
  13. }