From cb40b5918313f48338fc16ca241e32902adbb1f3 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Fri, 30 Sep 2016 10:47:07 -0500 Subject: [PATCH] Fix AVA tests on Linux (#735) --- test/index.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/index.js b/test/index.js index f94e24bc..950d4dac 100644 --- a/test/index.js +++ b/test/index.js @@ -8,8 +8,23 @@ import {Application} from 'spectron'; let app; test.before(async () => { + let pathToBinary; + + switch (process.platform) { + case 'linux': + pathToBinary = path.join(__dirname, '../dist/linux-unpacked/HyperTerm'); + break; + + case 'darwin': + pathToBinary = path.join(__dirname, '../dist/mac/HyperTerm.app/Contents/MacOS/HyperTerm'); + break; + + default: + throw new Error('Path to the built binary needs to be defined for this platform in test/index.js'); + } + app = new Application({ - path: path.join(__dirname, '../dist/mac/HyperTerm.app/Contents/MacOS/HyperTerm') + path: pathToBinary }); await app.start();