@@ -28,7 +28,7 @@ test('can make updates', () => {
28
28
} ) ;
29
29
} ) ;
30
30
31
- test ( 'can subscribe and unsubscribe to changes' , async ( ) => {
31
+ test ( 'can subscribe and unsubscribe to changes' , ( ) => {
32
32
const model = Model . create (
33
33
s . obj ( {
34
34
ui : s . obj ( {
@@ -44,25 +44,21 @@ test('can subscribe and unsubscribe to changes', async () => {
44
44
const unsubscribe = store . subscribe ( ( ) => {
45
45
cnt ++ ;
46
46
} ) ;
47
- await tick ( 1 ) ;
48
47
expect ( cnt ) . toBe ( 0 ) ;
49
48
store . update ( { op : 'str_ins' , path : '/text' , pos : 1 , str : 'x' } ) ;
50
- await tick ( 1 ) ;
51
49
expect ( cnt ) . toBe ( 1 ) ;
52
50
store . update ( { op : 'str_ins' , path : '/text' , pos : 1 , str : 'x' } ) ;
53
- await tick ( 1 ) ;
54
51
expect ( cnt ) . toBe ( 2 ) ;
55
52
unsubscribe ( ) ;
56
53
store . update ( { op : 'str_ins' , path : '/text' , pos : 1 , str : 'x' } ) ;
57
- await tick ( 1 ) ;
58
54
expect ( cnt ) . toBe ( 2 ) ;
59
55
expect ( store . getSnapshot ( ) ) . toEqual ( {
60
56
text : 'axxxbc' ,
61
57
counter : 123 ,
62
58
} ) ;
63
59
} ) ;
64
60
65
- test ( 'can bind to a sub-path' , async ( ) => {
61
+ test ( 'can bind to a sub-path' , ( ) => {
66
62
const model = Model . create (
67
63
s . obj ( {
68
64
ui : s . obj ( {
@@ -86,7 +82,7 @@ test('can bind to a sub-path', async () => {
86
82
} ) ;
87
83
} ) ;
88
84
89
- test ( 'can bind store to a "str" node' , async ( ) => {
85
+ test ( 'can bind store to a "str" node' , ( ) => {
90
86
const model = Model . create (
91
87
s . obj ( {
92
88
ui : s . obj ( {
@@ -104,7 +100,7 @@ test('can bind store to a "str" node', async () => {
104
100
expect ( store2 . getSnapshot ( ) ) . toEqual ( 'abcx' ) ;
105
101
} ) ;
106
102
107
- test ( 'can execute mutations inside a transaction' , async ( ) => {
103
+ test ( 'can execute mutations inside a transaction' , ( ) => {
108
104
const model = Model . create (
109
105
s . obj ( {
110
106
ui : s . obj ( {
@@ -126,7 +122,6 @@ test('can execute mutations inside a transaction', async () => {
126
122
store2 . update ( { op : 'str_ins' , path : '' , pos : 3 , str : 'x' } ) ;
127
123
} ) ;
128
124
expect ( cnt ) . toBe ( 1 ) ;
129
- await tick ( 1 ) ;
130
125
expect ( cnt ) . toBe ( 1 ) ;
131
126
expect ( store2 . getSnapshot ( ) ) . toEqual ( 'abcx' ) ;
132
127
} ) ;
0 commit comments