File tree Expand file tree Collapse file tree 6 files changed +39
-16
lines changed Expand file tree Collapse file tree 6 files changed +39
-16
lines changed Original file line number Diff line number Diff line change @@ -431,6 +431,13 @@ class DefaultView {
431431 }
432432 }
433433
434+ testTodo ( test ) {
435+ if ( ! this . options . viewHideSkips ) {
436+ const parent = test . parent ? test . parent . name : '' ;
437+ this . log ( `[cyan]{-} [cyan]{${ parent } } [cyan]{${ test . name } }` ) ;
438+ }
439+ }
440+
434441 testIgnore ( test ) { }
435442
436443 /**
Original file line number Diff line number Diff line change @@ -410,6 +410,13 @@ class DefaultView {
410410 }
411411 }
412412
413+ testTodo ( test ) {
414+ if ( ! this . options . viewHideSkips ) {
415+ const parent = test . parent ? test . parent . name : '' ;
416+ this . log ( `[cyan]{-} [cyan]{${ parent } } [cyan]{${ test . name } }` ) ;
417+ }
418+ }
419+
413420 testIgnore ( test ) { }
414421
415422 /**
Original file line number Diff line number Diff line change @@ -91,6 +91,13 @@ class DefaultView {
9191 }
9292 }
9393
94+ testTodo ( test ) {
95+ if ( ! this . options . viewHideSkips ) {
96+ const parent = test . parent ? test . parent . name : '' ;
97+ this . log ( `[cyan]{-} [cyan]{${ parent } } [cyan]{${ test . name } }` ) ;
98+ }
99+ }
100+
94101 testIgnore ( test ) { }
95102
96103 /**
Original file line number Diff line number Diff line change 2424 "ansi-escape-sequences" : " ^5.1.2"
2525 },
2626 "devDependencies" : {
27- "rollup" : " ^1.27.6 " ,
28- "test-object-model" : " ^0.5.7 "
27+ "rollup" : " ^1.27.8 " ,
28+ "test-object-model" : " ^0.5.10 "
2929 },
3030 "files" : [
3131 " index.mjs" ,
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import Tom from 'test-object-model'
33
44const defaultView = new DefaultView ( { viewShowStarts : true } )
55
6- {
6+ { /* main report */
77 async function start ( ) {
88 await defaultView . init ( )
99 console . log ( 'Main report:' )
@@ -22,15 +22,17 @@ const defaultView = new DefaultView({ viewShowStarts: true })
2222 } catch ( err ) {
2323 defaultView . testFail ( test3 , test3 . result )
2424 }
25+
26+ const todo = parent . todo ( 'a todo' )
27+ defaultView . testTodo ( todo )
2528 }
2629
2730 start ( ) . catch ( console . error )
2831}
2932
30- {
33+ { /* context data: pass */
3134 async function start ( ) {
3235 await defaultView . init ( )
33- console . log ( 'In-test data:' )
3436 const test = new Tom ( 'test 1' , function ( ) {
3537 this . data = {
3638 something : 'one' ,
@@ -44,7 +46,7 @@ const defaultView = new DefaultView({ viewShowStarts: true })
4446 start ( ) . catch ( console . error )
4547}
4648
47- {
49+ { /* context data: fail */
4850 async function start ( ) {
4951 await defaultView . init ( )
5052 const test = new Tom ( 'test 2' , function ( ) {
You can’t perform that action at this time.
0 commit comments