@@ -26,6 +26,8 @@ export class TestUtil {
26
26
27
27
public static thisPluginPath = path . join ( __dirname , "../.." ) ;
28
28
29
+ public static defaultShouldUseWkWebView = 0 ;
30
+
29
31
public static defaultAndroidServerUrl = "http://10.0.2.2:3001" ;
30
32
public static defaultIOSServerUrl = "http://127.0.0.1:3000" ;
31
33
@@ -54,6 +56,16 @@ export class TestUtil {
54
56
return testUpdatesDirectory ;
55
57
}
56
58
59
+ /**
60
+ * Reads wether or not whe should use WkWebView.
61
+ */
62
+ public static readShouldUseWkWebView ( ) : number {
63
+ var commandLineOption = parseInt ( TestUtil . readMochaCommandLineOption ( TestUtil . SHOULD_USE_WKWEBVIEW ) ) ;
64
+ var shouldUseWkWebView = commandLineOption ? commandLineOption : TestUtil . defaultShouldUseWkWebView ;
65
+ console . log ( "shouldUseWkWebView = " + shouldUseWkWebView ) ;
66
+ return shouldUseWkWebView ;
67
+ }
68
+
57
69
/**
58
70
* Reads the path of the plugin (whether or not we should use the local copy or pull from npm)
59
71
*/
@@ -256,7 +268,14 @@ export class TestUtil {
256
268
console . log ( "Running command: " + command ) ;
257
269
}
258
270
259
- child_process . exec ( command , options , ( error : Error , stdout : Buffer , stderr : Buffer ) => {
271
+ child_process . exec (
272
+ command ,
273
+ options ,
274
+ (
275
+ error : child_process . ExecException | null ,
276
+ stdout : Buffer | string ,
277
+ stderr : Buffer | string ,
278
+ ) => {
260
279
261
280
result += stdout ;
262
281
0 commit comments