Skip to content

Commit

Permalink
test: test that dry-run also skips prepare step
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Nov 14, 2018
1 parent c86518a commit 90b4974
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/index.test.js
Expand Up @@ -428,7 +428,7 @@ test('Log all "verifyRelease" errors', async t => {
t.deepEqual(fail.args[0][1].errors, [error1, error2]);
});

test('Dry-run skips publish and success', async t => {
test('Dry-run skips prepare, publish and success', async t => {
// Create a git repository, set the current working directory at the root of the repo
const {cwd, repositoryUrl} = await gitRepo(true);
// Add commits to the master branch
Expand All @@ -446,6 +446,7 @@ test('Dry-run skips publish and success', async t => {
const analyzeCommits = stub().resolves(nextRelease.type);
const verifyRelease = stub().resolves();
const generateNotes = stub().resolves(notes);
const prepare = stub().resolves();
const publish = stub().resolves();
const success = stub().resolves();

Expand All @@ -457,7 +458,7 @@ test('Dry-run skips publish and success', async t => {
analyzeCommits,
verifyRelease,
generateNotes,
prepare: stub().resolves(),
prepare,
publish,
success,
};
Expand All @@ -480,6 +481,7 @@ test('Dry-run skips publish and success', async t => {
t.is(analyzeCommits.callCount, 1);
t.is(verifyRelease.callCount, 1);
t.is(generateNotes.callCount, 1);
t.is(prepare.callCount, 0);
t.is(publish.callCount, 0);
t.is(success.callCount, 0);
});
Expand Down

0 comments on commit 90b4974

Please sign in to comment.