1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Edit spectron.js to deal with linux

This commit is contained in:
asmsuechan
2017-04-25 00:05:44 -07:00
parent 7961008500
commit eb48f48f6b

View File

@@ -3,8 +3,16 @@ import {Application} from 'spectron'
import path from 'path'
test.beforeEach(async t => {
const boostnotePath = ((platform) => {
switch (platform) {
case 'darwin':
return path.join('..', '..', 'dist', 'Boostnote-darwin-x64', 'Boostnote.app', 'Contents', 'MacOS', 'Boostnote')
case 'linux':
return path.join('..', '..', 'dist', 'Boostnote-linux-x64', 'Boostnote')
}
})(process.platform)
t.context.app = new Application({
path: path.join('..', '..', 'dist', 'Boostnote-darwin-x64', 'Boostnote.app', 'Contents', 'MacOS', 'Boostnote')
path: boostnotePath
})
await t.context.app.start()