From da6e61c613439dbb544deb712838f8baf7c0ddf2 Mon Sep 17 00:00:00 2001 From: Ingmar Stein Date: Thu, 15 Jun 2017 10:45:38 +0200 Subject: [PATCH] test: add test that checks if duration is NaN --- test/unit/reporters/base-reporter-test.coffee | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/unit/reporters/base-reporter-test.coffee b/test/unit/reporters/base-reporter-test.coffee index 2ad00cb8b..f68c023c3 100644 --- a/test/unit/reporters/base-reporter-test.coffee +++ b/test/unit/reporters/base-reporter-test.coffee @@ -118,3 +118,16 @@ describe 'BaseReporter', () -> it 'should set the end time', () -> assert.isOk tests[0].end + + describe 'when test start is UTC', () -> + + beforeEach () -> + test = + status: 'pass' + title: 'Passing Test' + emitter.emit 'test start', test + test.start = '2017-06-15T09:29:50.588Z' + emitter.emit 'test fail', test + + it 'should set the duration', () -> + assert.isNotNaN tests[0].duration