@@ -15,14 +15,14 @@ import {
15
15
16
16
// tslint:disable:no-unused-expression
17
17
18
- describe ( 'UniqueTaskId class' , function ( ) {
18
+ describe ( 'UniqueTaskId class' , function ( ) {
19
19
20
- it ( 'should get a string taskId' , function ( ) {
20
+ it ( 'should get a string taskId' , function ( ) {
21
21
const taskId : string = UniqueTaskId . getTaskId ( ) ;
22
22
expect ( taskId ) . to . be . a ( 'string' ) ;
23
23
} ) ;
24
24
25
- it ( " task id's should be different each call" , function ( ) {
25
+ it ( ' task id\ 's should be different each call' , function ( ) {
26
26
const taskId1 : string = UniqueTaskId . getTaskId ( ) ;
27
27
const taskId2 : string = UniqueTaskId . getTaskId ( ) ;
28
28
@@ -31,19 +31,19 @@ describe('UniqueTaskId class', function () {
31
31
32
32
} ) ;
33
33
34
- describe ( 'TaskTimerManager class' , function ( ) {
34
+ describe ( 'TaskTimerManager class' , function ( ) {
35
35
const TEST_DELAY = 200 ;
36
36
37
- before ( function ( ) {
37
+ before ( function ( ) {
38
38
logger . reset ( ) ; // Don't assume anything
39
39
logger . muteLogger = true ;
40
40
} ) ;
41
41
42
- after ( function ( ) {
42
+ after ( function ( ) {
43
43
logger . reset ( ) ;
44
44
} ) ;
45
45
46
- it ( 'start a timer' , function ( ) {
46
+ it ( 'start a timer' , function ( ) {
47
47
const taskId : string = defaultTimers . startTimer ( 'Test Timer' ) ;
48
48
expect ( taskId ) . to . be . a ( 'string' ) ;
49
49
@@ -54,12 +54,12 @@ describe('TaskTimerManager class', function () {
54
54
expect ( taskData ! . start ) . to . be . greaterThan ( 0 ) ;
55
55
} ) ;
56
56
57
- it ( 'start, wait (~' + TEST_DELAY + 'ms), and stop a timer' , function ( done ) {
57
+ it ( 'start, wait (~' + TEST_DELAY + 'ms), and stop a timer' , function ( done ) {
58
58
let tReport : TaskTimerReport = defaultTimers . timerReport ( ) ;
59
59
const currentCount : number = tReport . taskCount ;
60
60
61
61
const taskId : string = defaultTimers . startTimer ( 'Test Timer' ) ;
62
- setTimeout ( function ( ) {
62
+ setTimeout ( function ( ) {
63
63
const tStop = defaultTimers . stopTimer ( taskId ) ;
64
64
expect ( tStop ) . to . be . at . least ( TEST_DELAY ) ;
65
65
@@ -69,36 +69,36 @@ describe('TaskTimerManager class', function () {
69
69
} , TEST_DELAY ) ;
70
70
} ) ;
71
71
72
- it ( 'stopTimer should return a negative result for an unknown taskId' , function ( ) {
72
+ it ( 'stopTimer should return a negative result for an unknown taskId' , function ( ) {
73
73
defaultTimers . startTimer ( 'Test Timer' ) ;
74
74
const tStop : number = defaultTimers . stopTimer ( 'NO WAY' ) ;
75
75
expect ( tStop ) . to . be . lessThan ( 0 ) ;
76
76
} ) ;
77
77
78
- it ( 'timerStatus should return an undefined result for an unknown taskId' , function ( ) {
78
+ it ( 'timerStatus should return an undefined result for an unknown taskId' , function ( ) {
79
79
defaultTimers . startTimer ( 'Test Timer' ) ;
80
80
const tStatus : TaskData | undefined = defaultTimers . timerStatus ( 'NO WAY' ) ;
81
81
expect ( tStatus ) . to . be . undefined ;
82
82
} ) ;
83
83
84
- it ( 'getName() should return the name of the timers' , function ( ) {
84
+ it ( 'getName() should return the name of the timers' , function ( ) {
85
85
expect ( defaultTimers . getName ( ) ) . to . equal ( DEFAULT_TASK_TIMER_MANAGER_NAME ) ;
86
86
} ) ;
87
87
88
- it ( 'toString() should return a string' , function ( ) {
88
+ it ( 'toString() should return a string' , function ( ) {
89
89
expect ( defaultTimers . toString ( ) ) . to . be . a ( 'string' ) ;
90
90
} ) ;
91
91
} ) ;
92
92
93
- describe ( 'TaskTimer class' , function ( ) {
93
+ describe ( 'TaskTimer class' , function ( ) {
94
94
95
- it ( 'should throw TypeError during construction' , function ( ) {
96
- expect ( function ( ) {
95
+ it ( 'should throw TypeError during construction' , function ( ) {
96
+ expect ( function ( ) {
97
97
// @ts -ignore
98
98
new TaskTimer ( undefined , 'Hello' ) ;
99
99
} ) . to . throw ( TypeError ) ;
100
100
101
- expect ( function ( ) {
101
+ expect ( function ( ) {
102
102
// @ts -ignore
103
103
new TaskTimer ( "This doesn't matter" , undefined ) ;
104
104
} ) . to . throw ( TypeError ) ;
0 commit comments