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

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlacy committed Mar 13, 2015
2 parents 3292fc2 + 6920483 commit 7fb8a69
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,18 @@ describe('gulp-bump: JSON comparison fixtures', function() {
bumpS.end();
});

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

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

bumpS.once('data', function(newFile) {
should.exist(newFile);
should.exist(newFile.contents);
console.log(String(newFile.contents));
JSON.parse(newFile.contents.toString()).version.should.equal('0.1.1-beta.0');
JSON.parse(newFile.contents.toString()).version.should.equal('0.0.2-alphaWhateverTheYWant.0');
return done();
});
bumpS.write(fakeFile);
Expand All @@ -147,7 +146,6 @@ describe('gulp-bump: JSON comparison fixtures', function() {
bumpS.once('data', function(newFile) {
should.exist(newFile);
should.exist(newFile.contents);
console.log(String(newFile.contents));
JSON.parse(newFile.contents.toString()).version.should.equal('0.1.0-zeta.2');
return done();
});
Expand Down

0 comments on commit 7fb8a69

Please sign in to comment.