angular-docs-cn/packages/zone.js/test/browser
JiaLiPassion 27358eb60f feat(zone.js): monkey patches queueMicrotask() (#38904)
Close #38863

Monkey patches `queueMicrotask()` API, so the callback runs in the zone
when scheduled, and also the task is run as `microTask`.

```
Zone.current.fork({
  name: 'queueMicrotask',
  onScheduleTask: (delegate: ZoneDelegate, curr: Zone, target: Zone, task: Task) => {
    logs.push(task.type);
    logs.push(task.source);
    return delegate.scheduleTask(target, task);
  }
}).run(() => {
    queueMicrotask(() => {
      expect(logs).toEqual(['microTask', 'queueMicrotask']);
      expect(Zone.current.name).toEqual('queueMicrotask');
      done();
  });
});

```

PR Close #38904
2020-11-05 11:23:33 -08:00
..
FileReader.spec.ts
HTMLImports.spec.ts
MediaQuery.spec.ts
MutationObserver.spec.ts
Notification.spec.ts
WebSocket.spec.ts
Worker.spec.ts
XMLHttpRequest.spec.ts fix(zone.js): should invoke xhr send task when no response error occurs (#38836) 2020-09-18 11:19:37 -07:00
browser.spec.ts test(zone.js): do not run tests on IE 9 and IE 10 (#39189) 2020-10-12 08:27:25 -07:00
custom-element.spec.js
define-property.spec.ts
element.spec.ts
geolocation.spec.manual.ts
messageport.spec.ts
queue-microtask.spec.ts feat(zone.js): monkey patches queueMicrotask() (#38904) 2020-11-05 11:23:33 -08:00
registerElement.spec.ts
requestAnimationFrame.spec.ts
shadydom.spec.ts