Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Commit

Permalink
add basic test for preid
Browse files Browse the repository at this point in the history
  • Loading branch information
scamden committed Mar 13, 2015
1 parent d23cb78 commit 6920483
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,22 @@ describe('gulp-bump: JSON comparison fixtures', function() {
bumpS.write(fakeFile);
bumpS.end();
});

it('should bump to a prerelease version with a preid', function(done) {
var fakeFile = new gutil.File({
contents: new Buffer('{ "version": "0.0.1"}'),
path: 'test/fixtures/test.json'
});

var bumpS = bump({type: 'prerelease', preid : 'alphaWhateverTheYWant'});

bumpS.once('data', function(newFile) {
should.exist(newFile);
should.exist(newFile.contents);
JSON.parse(newFile.contents.toString()).version.should.equal('0.0.2-alphaWhateverTheYWant.0');
return done();
});
bumpS.write(fakeFile);
bumpS.end();
});
});

0 comments on commit 6920483

Please sign in to comment.