Skip to content

Commit

Permalink
Make your tests orders of magnitude faster with One Neat Trick™
Browse files Browse the repository at this point in the history
  • Loading branch information
DingoEatingFuzz committed Nov 7, 2018
1 parent 333e76b commit c95821e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/app/utils/classes/abstract-stats-tracker.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Ember from 'ember';
import Mixin from '@ember/object/mixin';
import { assert } from '@ember/debug';
import { task, timeout } from 'ember-concurrency';
Expand Down Expand Up @@ -69,12 +70,12 @@ export default Mixin.create({
throw new Error(error);
}

yield timeout(2000);
yield timeout(Ember.testing ? 0 : 2000);
}).drop(),

signalPause: task(function*() {
// wait 2 seconds
yield timeout(2000);
yield timeout(Ember.testing ? 0 : 2000);
// if no poll called in 2 seconds, pause
this.pause();
}).drop(),
Expand Down

0 comments on commit c95821e

Please sign in to comment.