create-dmg/test.js
Sindre Sorhus 9af0ca6f5d Make the default output name for humans
No longer replaces spaces in the DMG name with dashes.
2018-04-29 20:46:11 +07:00

21 lines
472 B
JavaScript

import path from 'path';
import fs from 'fs';
import test from 'ava';
import execa from 'execa';
import tempy from 'tempy';
test('main', async t => {
const cwd = tempy.directory();
try {
await execa(path.join(__dirname, 'cli.js'), [path.join(__dirname, 'fixture.app')], {cwd});
} catch (err) {
// Silence code signing failure
if (!/Code signing failed/.test(err.message)) {
throw err;
}
}
t.true(fs.existsSync(path.join(cwd, 'Fixture 0.0.1.dmg')));
});