Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Aug 27, 2020
1 parent 072d7c1 commit 4f16bee
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions tests/launcher.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,16 @@ describe('ChromeDriverLauncher launcher', () => {
{ browserName: 'firefox' }
]
multiremoteCaps = {
myCustomChromeBrowser: { browserName: 'chrome' },
myCustomFirefoxBrowser: { browserName: 'firefox' }
myCustomChromeBrowser: {
capabilities: {
browserName: 'chrome'
}
},
myCustomFirefoxBrowser: {
capabilities: {
browserName: 'firefox'
}
}
}
})

Expand Down Expand Up @@ -170,14 +178,18 @@ describe('ChromeDriverLauncher launcher', () => {

expect(Launcher.capabilities).toEqual({
myCustomChromeBrowser: {
browserName: 'chrome',
protocol: 'http',
hostname: 'localhost',
port: 9515,
path: '/'
path: '/',
capabilities: {
browserName: 'chrome',
}
},
myCustomFirefoxBrowser: {
browserName: 'firefox'
capabilities: {
browserName: 'firefox'
}
}
})
})
Expand Down Expand Up @@ -317,7 +329,7 @@ describe('ChromeDriverLauncher launcher', () => {

await Launcher.onPrepare()

expect(fs.createWriteStream.mock.calls[0][0]).toBe(path.join(process.cwd(), 'dummy', 'chromedriver.log'))
expect(fs.createWriteStream.mock.calls[0][0]).toBe(path.join(process.cwd(), 'dummy', 'wdio-chromedriver.log'))
expect(Launcher.process.stdout.pipe).toBeCalled()
expect(Launcher.process.stderr.pipe).toBeCalled()
})
Expand Down

0 comments on commit 4f16bee

Please sign in to comment.