@@ -17,7 +17,14 @@ describe('runOpen util', () => {
17
17
18
18
it ( 'on specify URL' , ( ) => {
19
19
return runOpen ( 'https://example.com' , { } , console ) . then ( ( ) => {
20
- expect ( opn . mock . calls [ 0 ] ) . toEqual ( [ 'https://example.com' , { } ] ) ;
20
+ expect ( opn . mock . calls [ 0 ] ) . toMatchInlineSnapshot ( `
21
+ Array [
22
+ "https://example.com",
23
+ Object {
24
+ "wait": false,
25
+ },
26
+ ]
27
+ ` ) ;
21
28
} ) ;
22
29
} ) ;
23
30
@@ -27,10 +34,14 @@ describe('runOpen util', () => {
27
34
{ openPage : '/index.html' } ,
28
35
console
29
36
) . then ( ( ) => {
30
- expect ( opn . mock . calls [ 0 ] ) . toEqual ( [
31
- 'https://example.com/index.html' ,
32
- { } ,
33
- ] ) ;
37
+ expect ( opn . mock . calls [ 0 ] ) . toMatchInlineSnapshot ( `
38
+ Array [
39
+ "https://example.com/index.html",
40
+ Object {
41
+ "wait": false,
42
+ },
43
+ ]
44
+ ` ) ;
34
45
} ) ;
35
46
} ) ;
36
47
@@ -40,10 +51,15 @@ describe('runOpen util', () => {
40
51
{ open : 'Google Chrome' } ,
41
52
console
42
53
) . then ( ( ) => {
43
- expect ( opn . mock . calls [ 0 ] ) . toEqual ( [
44
- 'https://example.com' ,
45
- { app : 'Google Chrome' } ,
46
- ] ) ;
54
+ expect ( opn . mock . calls [ 0 ] ) . toMatchInlineSnapshot ( `
55
+ Array [
56
+ "https://example.com",
57
+ Object {
58
+ "app": "Google Chrome",
59
+ "wait": false,
60
+ },
61
+ ]
62
+ ` ) ;
47
63
} ) ;
48
64
} ) ;
49
65
@@ -53,10 +69,15 @@ describe('runOpen util', () => {
53
69
{ open : 'Google Chrome' , openPage : '/index.html' } ,
54
70
console
55
71
) . then ( ( ) => {
56
- expect ( opn . mock . calls [ 0 ] ) . toEqual ( [
57
- 'https://example.com/index.html' ,
58
- { app : 'Google Chrome' } ,
59
- ] ) ;
72
+ expect ( opn . mock . calls [ 0 ] ) . toMatchInlineSnapshot ( `
73
+ Array [
74
+ "https://example.com/index.html",
75
+ Object {
76
+ "app": "Google Chrome",
77
+ "wait": false,
78
+ },
79
+ ]
80
+ ` ) ;
60
81
} ) ;
61
82
} ) ;
62
83
} ) ;
@@ -77,7 +98,14 @@ describe('runOpen util', () => {
77
98
expect ( logMock . warn . mock . calls [ 0 ] [ 0 ] ) . toMatchInlineSnapshot (
78
99
`"Unable to open browser. If you are running in a headless environment, please do not use the --open flag"`
79
100
) ;
80
- expect ( opn . mock . calls [ 0 ] ) . toEqual ( [ 'https://example.com' , { } ] ) ;
101
+ expect ( opn . mock . calls [ 0 ] ) . toMatchInlineSnapshot ( `
102
+ Array [
103
+ "https://example.com",
104
+ Object {
105
+ "wait": false,
106
+ },
107
+ ]
108
+ ` ) ;
81
109
} ) ;
82
110
} ) ;
83
111
@@ -90,10 +118,14 @@ describe('runOpen util', () => {
90
118
expect ( logMock . warn . mock . calls [ 0 ] [ 0 ] ) . toMatchInlineSnapshot (
91
119
`"Unable to open browser. If you are running in a headless environment, please do not use the --open flag"`
92
120
) ;
93
- expect ( opn . mock . calls [ 0 ] ) . toEqual ( [
94
- 'https://example.com/index.html' ,
95
- { } ,
96
- ] ) ;
121
+ expect ( opn . mock . calls [ 0 ] ) . toMatchInlineSnapshot ( `
122
+ Array [
123
+ "https://example.com/index.html",
124
+ Object {
125
+ "wait": false,
126
+ },
127
+ ]
128
+ ` ) ;
97
129
} ) ;
98
130
} ) ;
99
131
@@ -106,12 +138,15 @@ describe('runOpen util', () => {
106
138
expect ( logMock . warn . mock . calls [ 0 ] [ 0 ] ) . toMatchInlineSnapshot (
107
139
`"Unable to open browser: Google Chrome. If you are running in a headless environment, please do not use the --open flag"`
108
140
) ;
109
- expect ( opn . mock . calls [ 0 ] ) . toEqual ( [
110
- 'https://example.com' ,
111
- {
112
- app : 'Google Chrome' ,
113
- } ,
114
- ] ) ;
141
+ expect ( opn . mock . calls [ 0 ] ) . toMatchInlineSnapshot ( `
142
+ Array [
143
+ "https://example.com",
144
+ Object {
145
+ "app": "Google Chrome",
146
+ "wait": false,
147
+ },
148
+ ]
149
+ ` ) ;
115
150
} ) ;
116
151
} ) ;
117
152
@@ -124,10 +159,15 @@ describe('runOpen util', () => {
124
159
expect ( logMock . warn . mock . calls [ 0 ] [ 0 ] ) . toMatchInlineSnapshot (
125
160
`"Unable to open browser: Google Chrome. If you are running in a headless environment, please do not use the --open flag"`
126
161
) ;
127
- expect ( opn . mock . calls [ 0 ] ) . toEqual ( [
128
- 'https://example.com/index.html' ,
129
- { app : 'Google Chrome' } ,
130
- ] ) ;
162
+ expect ( opn . mock . calls [ 0 ] ) . toMatchInlineSnapshot ( `
163
+ Array [
164
+ "https://example.com/index.html",
165
+ Object {
166
+ "app": "Google Chrome",
167
+ "wait": false,
168
+ },
169
+ ]
170
+ ` ) ;
131
171
} ) ;
132
172
} ) ;
133
173
} ) ;
0 commit comments