File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,9 @@ exports['saved commands from long-name-spec.js 184-188-192-196-200-204-208-212-2
45
45
]
46
46
47
47
exports [ 'spec a.js finished with' ] = {
48
- "totalTests" : 3 ,
48
+ "totalTests" : 4 ,
49
49
"totalFailed" : 2 ,
50
- "totalPassed" : 1 ,
50
+ "totalPassed" : 2 ,
51
51
"totalPending" : 0 ,
52
52
"totalSkipped" : 0
53
53
}
Original file line number Diff line number Diff line change @@ -10,7 +10,14 @@ describe('root suite', () => {
10
10
cy . wrap ( person ) . its ( 'name' ) . should ( 'equal' , 'Mo' )
11
11
setTimeout ( ( ) => {
12
12
person . name = 'Mo'
13
+
14
+ setTimeout ( ( ) => {
15
+ person . name = 'Joe'
16
+ } , 2000 )
13
17
} , 2000 )
18
+
19
+ cy . wrap ( person ) . its ( 'name' ) . should ( 'equal' , 'Joe' )
20
+
14
21
} )
15
22
16
23
it ( 'has second test (failing)' , ( ) => {
Original file line number Diff line number Diff line change @@ -80,6 +80,9 @@ function startLogging () {
80
80
81
81
Cypress . on ( 'log:changed' , options => {
82
82
if ( options . instrument === 'command' && options . consoleProps ) {
83
+ // This is NOT the exact command duration, since we are only
84
+ // getting an event some time after the command finishes.
85
+ // Still better to have approximate value than nothing
83
86
options . wallClockStoppedAt = Date . now ( )
84
87
options . duration = + options . wallClockStoppedAt - ( + new Date ( options . wallClockStartedAt ) )
85
88
options . consoleProps . Duration = options . duration
You can’t perform that action at this time.
0 commit comments