GlobeTownDevs / stopwatch

Stopping your watches
0 stars 1 forks source link

Clarity on asynchronous test #3

Closed njsfield closed 7 years ago

njsfield commented 7 years ago
 it('should start displaying seconds when milliseconds count is greater than 999', function(done) {
    expect(Math.abs(s.innerHTML)).toBe(2);
    done();
  });

The expect function should just check if ms is greater than 999, Currently the test is being too specific and checking that ~2 seconds is displayed

marisid commented 7 years ago

The point of this test was to prompt the next step in the development of the app, which was to have it start displaying seconds (previously it was just showing milliseconds). We chose a specific (small) amount of time to run the test to ensure that seconds would start appearing.