Skip to content

Commit

Permalink
test(pkg.transform): add short repo package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
stevemao committed Jul 22, 2015
1 parent 1016e08 commit 2884a47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions test/fixtures/_short.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"version": "0.0.17",
"repository": "ajoslin/conventional-changelog"
}
5 changes: 3 additions & 2 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ describe('conventionalChangelog', function() {
it('should transform package.json data', function(done) {
conventionalChangelog({
pkg: {
path: __dirname + '/fixtures/_package.json',
path: __dirname + '/fixtures/_short.json',
transform: function(pkg) {
pkg.version = 'v' + pkg.version;
pkg.repository.url = 'https://github.com/a/b.git';
return pkg;
}
}
Expand All @@ -98,7 +99,7 @@ describe('conventionalChangelog', function() {

expect(chunk).to.include('## v0.0.17');
expect(chunk).to.include('First commit');
expect(chunk).to.include('closes [#1](https://github.com/ajoslin/conventional-changelog/issues/1)');
expect(chunk).to.include('closes [#1](https://github.com/a/b/issues/1)');

done();
}));
Expand Down

0 comments on commit 2884a47

Please sign in to comment.