Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
test(fix): fix flaky test setInterval in android 4.4 (#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaLiPassion authored and mhevery committed Jan 23, 2017
1 parent e6d5e98 commit a58cde4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/common/setInterval.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ describe('setInterval', function() {
testZone.run(() => {
let id;
let intervalCount = 0;
let timeoutRunning = false;
const intervalFn = function() {
intervalCount++;
expect(Zone.current.name).toEqual(('TestZone'));
if (timeoutRunning) {
return;
}
timeoutRunning = true;
global[zoneSymbol('setTimeout')](function() {
const intervalUnitLog = [
'> Zone:invokeTask:setInterval("<root>::ProxyZone::WTF::TestZone")',
Expand Down

0 comments on commit a58cde4

Please sign in to comment.