-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.setup.ts
27 lines (24 loc) · 854 Bytes
/
jest.setup.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { remote } from 'webdriverio'
import { RemoteOptions } from '@wdio/sync'
// @ts-ignore
import { launcher as wmLauncher } from 'wdio-wiremock-service'
// @ts-ignore
import { launcher } from 'wdio-chromedriver-service'
const CHROMEDRIVER_PORT = 4444
const WDIO_OPTIONS = {
port: CHROMEDRIVER_PORT,
path: '/', // remove `path` if you decided using something different from driver binaries.
capabilities: {
browserName: 'chrome'
},
waitforTimeout: 10000,
logLevel: 'silent'
} as RemoteOptions
beforeAll(async () => {
require('expect-webdriverio')
global.wiremockLauncher = new wmLauncher({ rootDir: './__stubs__' })
global.chromedriverLauncher = new launcher()
await global.wiremockLauncher.onPrepare(WDIO_OPTIONS)
await global.chromedriverLauncher.onPrepare(WDIO_OPTIONS)
global.browser = await remote(WDIO_OPTIONS)
})