Skip to content

Commit

Permalink
Add test for infile: false
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Oct 8, 2022
1 parent 9aecd6a commit 40869a1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test.js
Expand Up @@ -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`);
Expand Down

0 comments on commit 40869a1

Please sign in to comment.