forked from conventional-changelog/releaser-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: create release using gitlab recommended api
https://docs.gitlab.com/ee/api/releases/#create-a-release Fix conventional-changelog#57 Signed-off-by: Sassoun Derderian <[email protected]>
- Loading branch information
Sassoun Derderian
committed
Mar 26, 2020
1 parent
a49e45d
commit 36f055a
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
'use strict' | ||
|
||
const chai = require('chai') | ||
const mocha = require(`mocha`) | ||
const conventionalGitlabReleaser = require('./index') | ||
|
||
const expect = chai.expect | ||
|
||
const beforeEach = mocha.beforeEach | ||
const describe = mocha.describe | ||
const it = mocha.it | ||
|
||
describe.only('index', function () { | ||
beforeEach(function () { | ||
this.chunk = { | ||
committerDate: 'June 8, 2012', | ||
gitTags: '' | ||
} | ||
}) | ||
|
||
it('should throw an error if no argument is passed', function () { | ||
expect(conventionalGitlabReleaser).to.throw() | ||
}) | ||
|
||
it('should throw an error if no user callback is passed', function () { | ||
expect(function () { | ||
conventionalGitlabReleaser({}, {}, {}, {}, {}) | ||
}).to.throw() | ||
}) | ||
|
||
it('should not throw if userCb is a callback function', function () { | ||
const userCb = function () {} | ||
expect(function () { | ||
conventionalGitlabReleaser({}, {}, {}, {}, {}, userCb) | ||
}).not.to.throw() | ||
}) | ||
}) |