2017-03-27 21:09:27 +07:00
|
|
|
import path from 'path';
|
|
|
|
import fs from 'fs';
|
|
|
|
import test from 'ava';
|
|
|
|
import execa from 'execa';
|
2018-04-29 19:07:51 +07:00
|
|
|
import tempy from 'tempy';
|
2017-03-27 21:09:27 +07:00
|
|
|
|
2018-04-29 19:07:51 +07:00
|
|
|
test('main', async t => {
|
|
|
|
const cwd = tempy.directory();
|
2017-03-31 19:52:13 +07:00
|
|
|
|
|
|
|
try {
|
|
|
|
await execa(path.join(__dirname, 'cli.js'), [path.join(__dirname, 'fixture.app')], {cwd});
|
2018-10-17 14:59:58 +07:00
|
|
|
} catch (error) {
|
2017-03-31 19:52:13 +07:00
|
|
|
// Silence code signing failure
|
2018-10-17 14:59:58 +07:00
|
|
|
if (!/Code signing failed/.test(error.message)) {
|
|
|
|
throw error;
|
2017-03-31 19:52:13 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-29 20:46:11 +07:00
|
|
|
t.true(fs.existsSync(path.join(cwd, 'Fixture 0.0.1.dmg')));
|
2017-03-27 21:09:27 +07:00
|
|
|
});
|