From 24b360f223f2da4fc933eb1c3f213a75c41dddc1 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 14 Jan 2021 11:00:55 -0800 Subject: [PATCH] test: avoid crashing if pnpm-lock does not exist --- src/cli.test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cli.test.js b/src/cli.test.js index e346139..0046b05 100644 --- a/src/cli.test.js +++ b/src/cli.test.js @@ -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(); }); });