4
4
*/
5
5
6
6
import { afterEach , describe , expect , expectTypeOf , it } from 'vitest' ;
7
- import { renderHook , waitFor , act , cleanup } from '@testing-library/react' ;
7
+ import { renderHook , waitFor , act } from '@testing-library/react' ;
8
8
9
9
import type { CKEditorCloudConfig } from '@ckeditor/ckeditor5-integrations-common' ;
10
10
import { removeAllCkCdnResources } from '@ckeditor/ckeditor5-integrations-common/test-utils' ;
11
11
12
12
import useCKEditorCloud from '../../src/cloud/useCKEditorCloud.js' ;
13
13
14
- describe ( 'useCKEditorCloud' , ( ) => {
14
+ describe ( 'useCKEditorCloud' , { timeout : 8000 } , ( ) => {
15
15
afterEach ( ( ) => {
16
- cleanup ( ) ;
17
16
removeAllCkCdnResources ( ) ;
18
17
} ) ;
19
18
@@ -31,7 +30,7 @@ describe( 'useCKEditorCloud', () => {
31
30
if ( result . current . status === 'success' ) {
32
31
expect ( result . current . CKEditor ) . toBeDefined ( ) ;
33
32
}
34
- } ) ;
33
+ } , { timeout : 5000 } ) ;
35
34
} ) ;
36
35
37
36
it ( 'should load additional bundle after updating deps' , async ( ) => {
@@ -52,7 +51,7 @@ describe( 'useCKEditorCloud', () => {
52
51
expect ( result . current . CKEditor ) . toBeDefined ( ) ;
53
52
expect ( result . current . CKEditorPremiumFeatures ) . toBeUndefined ( ) ;
54
53
}
55
- } ) ;
54
+ } , { timeout : 5000 } ) ;
56
55
57
56
rerender ( {
58
57
version : '43.0.0' ,
@@ -70,7 +69,7 @@ describe( 'useCKEditorCloud', () => {
70
69
expect ( result . current . CKEditor ) . toBeDefined ( ) ;
71
70
expect ( result . current . CKEditorPremiumFeatures ) . toBeDefined ( ) ;
72
71
}
73
- } ) ;
72
+ } , { timeout : 5000 } ) ;
74
73
} ) ;
75
74
76
75
describe ( 'typings' , ( ) => {
@@ -82,7 +81,7 @@ describe( 'useCKEditorCloud', () => {
82
81
83
82
await waitFor ( ( ) => {
84
83
expect ( result . current . status ) . toBe ( 'success' ) ;
85
- } ) ;
84
+ } , { timeout : 5000 } ) ;
86
85
87
86
if ( result . current . status === 'success' ) {
88
87
expectTypeOf ( result . current . CKEditorPremiumFeatures ) . not . toBeNullable ( ) ;
@@ -97,7 +96,7 @@ describe( 'useCKEditorCloud', () => {
97
96
98
97
await waitFor ( ( ) => {
99
98
expect ( result . current . status ) . toBe ( 'success' ) ;
100
- } ) ;
99
+ } , { timeout : 5000 } ) ;
101
100
102
101
if ( result . current . status === 'success' ) {
103
102
expectTypeOf ( result . current . CKEditorPremiumFeatures ) . toBeNullable ( ) ;
@@ -111,7 +110,7 @@ describe( 'useCKEditorCloud', () => {
111
110
112
111
await waitFor ( ( ) => {
113
112
expect ( result . current . status ) . toBe ( 'success' ) ;
114
- } ) ;
113
+ } , { timeout : 5000 } ) ;
115
114
116
115
if ( result . current . status === 'success' ) {
117
116
expectTypeOf ( result . current . CKEditorPremiumFeatures ) . toBeNullable ( ) ;
@@ -128,7 +127,7 @@ describe( 'useCKEditorCloud', () => {
128
127
129
128
await waitFor ( ( ) => {
130
129
expect ( result . current . status ) . toBe ( 'success' ) ;
131
- } ) ;
130
+ } , { timeout : 5000 } ) ;
132
131
133
132
if ( result . current . status === 'success' ) {
134
133
expectTypeOf ( result . current . CKBox ) . not . toBeNullable ( ) ;
@@ -142,7 +141,7 @@ describe( 'useCKEditorCloud', () => {
142
141
143
142
await waitFor ( ( ) => {
144
143
expect ( result . current . status ) . toBe ( 'success' ) ;
145
- } ) ;
144
+ } , { timeout : 5000 } ) ;
146
145
147
146
if ( result . current . status === 'success' ) {
148
147
expectTypeOf ( result . current . CKBox ) . toBeNullable ( ) ;
0 commit comments