Skip to content

Commit

Permalink
test: avoid crashing if pnpm-lock does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jan 14, 2021
1 parent 9ff9eae commit 24b360f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ test("installs with pnpm successfully", t => {
const hasPnpmLockYaml = fs.existsSync(pnpmLockYamlPath);
t.equal(hasPnpmLockYaml, true);
// Delete pnpm-lock.yaml file
fs.unlinkSync(pnpmLockYamlPath);
try {
fs.unlinkSync(pnpmLockYamlPath);
} catch (e) {
/**/
}
t.end();
});
});
Expand Down

0 comments on commit 24b360f

Please sign in to comment.