@@ -8,27 +8,27 @@ var WriteTo = require('../../../built/logger').WriteTo;
8
8
var Local = require ( '../../../built/driverProviders' ) . Local ;
9
9
var webdriver , file ;
10
10
11
- describe ( 'local connect' , function ( ) {
12
- beforeEach ( function ( ) {
11
+ describe ( 'local connect' , ( ) => {
12
+ beforeEach ( ( ) => {
13
13
ProtractorError . SUPRESS_EXIT_CODE = true ;
14
14
Logger . setWrite ( WriteTo . NONE ) ;
15
15
} ) ;
16
16
17
- afterEach ( function ( ) {
17
+ afterEach ( ( ) => {
18
18
ProtractorError . SUPRESS_EXIT_CODE = false ;
19
19
Logger . setWrite ( WriteTo . CONSOLE ) ;
20
20
} ) ;
21
21
22
- describe ( 'without the selenium standalone jar' , function ( ) {
23
- it ( 'should throw an error jar file is not present' , function ( ) {
22
+ describe ( 'without the selenium standalone jar' , ( ) => {
23
+ it ( 'should throw an error jar file is not present' , async ( ) => {
24
24
var config = {
25
25
capabilities : { browserName : 'chrome' } ,
26
26
seleniumServerJar : '/foo/bar/selenium.jar'
27
27
} ;
28
28
var errorFound = false ;
29
29
try {
30
30
webdriver = new Local ( config ) ;
31
- webdriver . setupEnv ( ) ;
31
+ await webdriver . setupEnv ( ) ;
32
32
} catch ( e ) {
33
33
errorFound = true ;
34
34
expect ( e . code ) . toBe ( BrowserError . CODE ) ;
@@ -37,8 +37,8 @@ describe('local connect', function() {
37
37
} ) ;
38
38
} ) ;
39
39
40
- describe ( 'with the selenium standalone jar' , function ( ) {
41
- it ( 'should throw an error if the jar file does not work' , function ( ) {
40
+ describe ( 'with the selenium standalone jar' , ( ) => {
41
+ it ( 'should throw an error if the jar file does not work' , async ( ) => {
42
42
var jarFile = '' ;
43
43
beforeEach ( function ( ) {
44
44
// add files to selenium folder
@@ -54,7 +54,7 @@ describe('local connect', function() {
54
54
}
55
55
} ) ;
56
56
57
- it ( 'should throw an error if the selenium sever jar cannot be used' , function ( ) {
57
+ it ( 'should throw an error if the selenium sever jar cannot be used' , ( ) => {
58
58
var config = {
59
59
capabilities : { browserName : 'foobar explorer' } ,
60
60
seleniumServerJar : jarFile
@@ -73,7 +73,7 @@ describe('local connect', function() {
73
73
} ) ;
74
74
75
75
describe ( 'binary does not exist' , ( ) => {
76
- it ( 'should throw an error if the update-config.json does not exist' , ( ) => {
76
+ it ( 'should throw an error if the update-config.json does not exist' , async ( ) => {
77
77
spyOn ( fs , 'readFileSync' ) . and . callFake ( ( ) => { return null ; } ) ;
78
78
var config = {
79
79
capabilities : { browserName : 'chrome' } ,
@@ -82,7 +82,7 @@ describe('local connect', function() {
82
82
var errorFound = false ;
83
83
try {
84
84
webdriver = new Local ( config ) ;
85
- webdriver . setupDriverEnv ( ) ;
85
+ await webdriver . setupDriverEnv ( ) ;
86
86
} catch ( e ) {
87
87
errorFound = true ;
88
88
expect ( e . code ) . toBe ( BrowserError . CODE ) ;
0 commit comments