@@ -22,23 +22,20 @@ module('Integration | Component | rive-animation', function (hooks) {
22
22
await settled ( ) ;
23
23
24
24
// Wait until the canvas has non-transparent pixels
25
- await waitUntil (
26
- ( ) => {
27
- const context = canvas . getContext ( '2d' ) ;
28
- if ( ! context ) return false ;
25
+ await waitUntil ( ( ) => {
26
+ const context = canvas . getContext ( '2d' ) ;
27
+ if ( ! context ) return false ;
29
28
30
- const imageData = context . getImageData ( 0 , 0 , canvas . width , canvas . height ) . data ;
29
+ const imageData = context . getImageData ( 0 , 0 , canvas . width , canvas . height ) . data ;
31
30
32
- for ( let i = 0 ; i < imageData . length ; i += 4 ) {
33
- if ( imageData [ i + 3 ] !== 0 ) {
34
- return true ;
35
- }
31
+ for ( let i = 0 ; i < imageData . length ; i += 4 ) {
32
+ if ( imageData [ i + 3 ] !== 0 ) {
33
+ return true ;
36
34
}
35
+ }
37
36
38
- return false ;
39
- } ,
40
- { timeout : 5000 } ,
41
- ) ;
37
+ return false ;
38
+ } ) ;
42
39
43
40
// Check that canvas has been initialized
44
41
assert . ok ( canvas . width > 0 , 'Canvas has width' ) ;
@@ -76,23 +73,20 @@ module('Integration | Component | rive-animation', function (hooks) {
76
73
await settled ( ) ;
77
74
78
75
// Wait until the canvas has non-transparent pixels
79
- await waitUntil (
80
- ( ) => {
81
- const context = canvas . getContext ( '2d' ) ;
82
- if ( ! context ) return false ;
76
+ await waitUntil ( ( ) => {
77
+ const context = canvas . getContext ( '2d' ) ;
78
+ if ( ! context ) return false ;
83
79
84
- const imageData = context . getImageData ( 0 , 0 , canvas . width , canvas . height ) . data ;
80
+ const imageData = context . getImageData ( 0 , 0 , canvas . width , canvas . height ) . data ;
85
81
86
- for ( let i = 0 ; i < imageData . length ; i += 4 ) {
87
- if ( imageData [ i + 3 ] !== 0 ) {
88
- return true ;
89
- }
82
+ for ( let i = 0 ; i < imageData . length ; i += 4 ) {
83
+ if ( imageData [ i + 3 ] !== 0 ) {
84
+ return true ;
90
85
}
86
+ }
91
87
92
- return false ;
93
- } ,
94
- { timeout : 5000 } ,
95
- ) ;
88
+ return false ;
89
+ } ) ;
96
90
97
91
// Check that canvas has been initialized
98
92
assert . ok ( canvas . width > 0 , 'Canvas has width' ) ;
0 commit comments