File tree Expand file tree Collapse file tree 6 files changed +27
-27
lines changed Expand file tree Collapse file tree 6 files changed +27
-27
lines changed Original file line number Diff line number Diff line change 1
- let failed = false
1
+ let failed = false ;
2
2
try {
3
3
await self . yozo . register ( './bo-no-top-await.yz' ) ;
4
4
const element = document . createElement ( 'construct-no-top-await' ) ;
5
5
} catch {
6
- failed = true
6
+ failed = true ;
7
7
}
8
8
9
- assert ( failed )
9
+ assert ( failed ) ;
Original file line number Diff line number Diff line change @@ -11,4 +11,4 @@ await paint();
11
11
assert ( getComputedStyle ( p ) . fontStyle != 'italic' ) ;
12
12
assert ( getComputedStyle ( innerP ) . fontStyle == 'italic' ) ;
13
13
14
- export const refresh = true
14
+ export const refresh = true ;
Original file line number Diff line number Diff line change @@ -16,4 +16,4 @@ await paint();
16
16
assert ( getComputedStyle ( p ) . fontStyle != 'italic' ) ;
17
17
assert ( getComputedStyle ( innerP ) . fontStyle == 'italic' ) ;
18
18
19
- export const refresh = true
19
+ export const refresh = true ;
Original file line number Diff line number Diff line change @@ -9,4 +9,4 @@ await paint();
9
9
10
10
assert ( getComputedStyle ( p ) . fontStyle == 'italic' ) ;
11
11
12
- export const refresh = true
12
+ export const refresh = true ;
Original file line number Diff line number Diff line change 1
1
const { Flow } = self . yozo ;
2
2
const flow = new Flow ( ) ;
3
- let resolve
4
- const promise = new Promise ( ( ...args ) => resolve = args [ 0 ] )
5
- let stopped = false
3
+ let resolve ;
4
+ const promise = new Promise ( ( ...args ) => resolve = args [ 0 ] ) ;
5
+ let stopped = false ;
6
6
flow . once ( )
7
7
. await ( ( ) => promise )
8
- . cleanup ( ( ) => stopped = true )
8
+ . cleanup ( ( ) => stopped = true ) ;
9
9
10
10
flow . now ( ) ;
11
- await 'microtask'
11
+ await 'microtask' ;
12
12
flow . now ( ) ;
13
13
assert ( ! stopped ) ;
14
14
15
- resolve ( )
16
- await 'microtask'
15
+ resolve ( ) ;
16
+ await 'microtask' ;
17
17
assert ( stopped ) ;
Original file line number Diff line number Diff line change 1
1
const { Flow } = self . yozo ;
2
2
const flow = new Flow ( ) ;
3
- let first = 0
4
- let second = 0
5
- let stopped = false
3
+ let first = 0 ;
4
+ let second = 0 ;
5
+ let stopped = false ;
6
6
flow . await ( ( ) => 'microtask' )
7
7
. then ( ( ) => first ++ )
8
8
. await ( ( ) => 'microtask' )
9
9
. then ( ( ) => second ++ )
10
10
. once ( )
11
- . cleanup ( ( ) => stopped = true )
11
+ . cleanup ( ( ) => stopped = true ) ;
12
12
13
- flow . now ( )
14
- await 'microtask'
15
- flow . now ( )
13
+ flow . now ( ) ;
14
+ await 'microtask' ;
15
+ flow . now ( ) ;
16
16
17
- assert ( first == 1 )
18
- assert ( second == 0 )
19
- assert ( ! stopped )
17
+ assert ( first == 1 ) ;
18
+ assert ( second == 0 ) ;
19
+ assert ( ! stopped ) ;
20
20
21
- await 'microtask'
22
- assert ( first == 1 )
23
- assert ( second == 1 )
24
- assert ( stopped )
21
+ await 'microtask' ;
22
+ assert ( first == 1 ) ;
23
+ assert ( second == 1 ) ;
24
+ assert ( stopped ) ;
You can’t perform that action at this time.
0 commit comments