File tree Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -24,17 +24,32 @@ class StateTravel {
24
24
this . driver = driver ;
25
25
this . _counter = 0 ;
26
26
}
27
- }
28
27
29
- Object . keys ( DEFAULT ) . forEach ( m => {
30
- StateTravel . prototype [ m ] = async function ( ...args ) {
31
- await State . step ( this . driver , ++ this . _counter , this . internals ) ;
32
- const res = await State . update (
28
+ async step ( ) {
29
+ return State . step ( this . driver , ++ this . _counter , this . internals ) ;
30
+ }
31
+
32
+ async update ( ) {
33
+ return State . update (
33
34
this . driver ,
34
35
this . file ,
35
36
this . internals . modSchema ,
36
37
this . internals
37
38
) ;
39
+ }
40
+
41
+ async default ( ) {
42
+ await this . step ( ) ;
43
+ const res = await this . update ( ) ;
44
+
45
+ return res ;
46
+ }
47
+ }
48
+
49
+ Object . keys ( DEFAULT ) . forEach ( m => {
50
+ StateTravel . prototype [ m ] = async function ( ...args ) {
51
+ await this . step ( ) ;
52
+ const res = await this . update ( ) ;
38
53
39
54
return res ;
40
55
} ;
You can’t perform that action at this time.
0 commit comments