From 40869a157ed33dfb9e31ccd53bc3415fa5e3a7b5 Mon Sep 17 00:00:00 2001 From: Lars Kappert Date: Sat, 8 Oct 2022 11:14:48 +0200 Subject: [PATCH] Add test for `infile: false` --- test.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test.js b/test.js index db3ca83..8f3c8f8 100644 --- a/test.js +++ b/test.js @@ -290,6 +290,15 @@ test('should not write infile in dry run', async () => { assert.throws(() => fs.readFileSync(infile), /no such file/); }); +test('should not write infile if set to false', async () => { + const { dir } = setup(); + const infile = path.join(dir, 'DRYRUN.md'); + const options = getOptions({ preset, infile: false }); + const { version } = await runTasks(...options); + assert.throws(() => fs.readFileSync(infile), /no such file/); + assert.equal(version, '0.0.1'); +}); + test('should not bump when recommended bump returns null', async () => { setup(); sh.exec(`git tag 1.0.0`);