Permalink
Browse files

Correctly silence code signing failure in the tests

  • Loading branch information...
1 parent ca2675a commit 1f68d20be6f414e6b556b74f69e992a2f9ef37cb @sindresorhus committed Mar 31, 2017
Showing with 10 additions and 1 deletion.
  1. +10 −1 test.js
View
11 test.js
@@ -7,6 +7,15 @@ import tempfile from 'tempfile';
test(async t => {
const cwd = tempfile();
fs.mkdirSync(cwd);
- await t.throws(execa(path.join(__dirname, 'cli.js'), [path.join(__dirname, 'fixture.app')], {cwd}), /Code signing failed/);
+
+ 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')));
});

0 comments on commit 1f68d20

Please sign in to comment.