style: branch available in options not root of config
This commit is contained in:
@@ -7,7 +7,7 @@ const commits = proxyquire('../../dist/lib/commits', {
|
||||
|
||||
test('commits since last release', (t) => {
|
||||
t.test('get all commits', (tt) => {
|
||||
commits({lastRelease: {}, branch: 'master'}, (err, commits) => {
|
||||
commits({lastRelease: {}, options: {branch: 'master'}}, (err, commits) => {
|
||||
tt.error(err)
|
||||
tt.is(commits.length, 2, 'all commits')
|
||||
tt.is(commits[0].hash, 'hash-one', 'parsed hash')
|
||||
@@ -18,7 +18,7 @@ test('commits since last release', (t) => {
|
||||
})
|
||||
|
||||
t.test('get commits since hash', (tt) => {
|
||||
commits({lastRelease: {gitHead: 'hash'}, branch: 'master'}, (err, commits) => {
|
||||
commits({lastRelease: {gitHead: 'hash'}, options: {branch: 'master'}}, (err, commits) => {
|
||||
tt.error(err)
|
||||
tt.is(commits.length, 1, 'specified commits')
|
||||
tt.is(commits[0].hash, 'hash-one', 'parsed hash')
|
||||
@@ -29,7 +29,7 @@ test('commits since last release', (t) => {
|
||||
})
|
||||
|
||||
t.test('get commits since hash', (tt) => {
|
||||
commits({lastRelease: {gitHead: 'notinhistory'}, branch: 'notmaster'}, (err, commits) => {
|
||||
commits({lastRelease: {gitHead: 'notinhistory'}, options: {branch: 'notmaster'}}, (err, commits) => {
|
||||
tt.ok(err)
|
||||
tt.is(err.code, 'ENOTINHISTORY')
|
||||
tt.end()
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@ test('full pre run', (t) => {
|
||||
tt.plan(3)
|
||||
|
||||
pre({
|
||||
branch: 'master',
|
||||
options: {branch: 'master'},
|
||||
npm,
|
||||
pkg: {name: 'available'},
|
||||
plugins
|
||||
@@ -45,7 +45,7 @@ test('full pre run', (t) => {
|
||||
tt.plan(3)
|
||||
|
||||
pre({
|
||||
branch: 'master',
|
||||
options: {branch: 'master'},
|
||||
npm,
|
||||
pkg: {name: 'unavailable'},
|
||||
plugins
|
||||
|
||||
Reference in New Issue
Block a user