@@ -11,7 +11,7 @@ import { timeout } from '../util/util'
11
11
describe ( 'integration' , ( ) => {
12
12
it ( 'renders React elements for each supported option' , async ( ) => {
13
13
await cleanSwalState ( )
14
- const MySwal = withReactContent ( )
14
+ const MySwal = withReactContent ( Swal )
15
15
await MySwal . fire ( {
16
16
animation : false ,
17
17
title : < span > title</ span > ,
@@ -35,7 +35,7 @@ describe('integration', () => {
35
35
} )
36
36
it ( 'can mix React and non-React params' , async ( ) => {
37
37
await cleanSwalState ( )
38
- const MySwal = withReactContent ( )
38
+ const MySwal = withReactContent ( Swal )
39
39
await MySwal . fire ( {
40
40
animation : false ,
41
41
title : < span > React element</ span > ,
@@ -50,7 +50,7 @@ describe('integration', () => {
50
50
} )
51
51
} )
52
52
it ( 'returns a class with the same instance & static properties as Swal' , async ( ) => {
53
- const MySwal = withReactContent ( )
53
+ const MySwal = withReactContent ( Swal )
54
54
Object . keys ( Swal ) . forEach ( key => {
55
55
expect ( typeof MySwal [ key ] ) . toBe ( typeof Swal [ key ] )
56
56
} )
@@ -60,7 +60,7 @@ describe('integration', () => {
60
60
} )
61
61
it ( 'works with shorthand Swal calls' , async ( ) => {
62
62
await cleanSwalState ( )
63
- const MySwal = withReactContent ( )
63
+ const MySwal = withReactContent ( Swal )
64
64
const swal = MySwal . fire ( < span > title</ span > , < span > html</ span > , 'info' )
65
65
await timeout ( 100 )
66
66
expect ( MySwal . getTitle ( ) . innerHTML ) . toEqual ( '<span>title</span>' )
@@ -71,7 +71,7 @@ describe('integration', () => {
71
71
} )
72
72
it ( 'has no effect on normal shorthand Swal calls' , async ( ) => {
73
73
await cleanSwalState ( )
74
- const MySwal = withReactContent ( )
74
+ const MySwal = withReactContent ( Swal )
75
75
const swal = MySwal . fire ( 'my title' , 'my html' , 'error' )
76
76
await timeout ( 100 )
77
77
expect ( MySwal . getTitle ( ) . innerHTML ) . toEqual ( 'my title' )
0 commit comments