Skip to content

Commit f4bc60a

Browse files
test: add log.info to tests
1 parent 28de0fd commit f4bc60a

8 files changed

+8
-5
lines changed

test/unit/lib/plugins/autolinks.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ describe('Autolinks', () => {
55
let github
66

77
function configure (config) {
8-
const log = { debug: jest.fn(), error: console.error }
8+
const log = { ...console, debug: jest.fn() }
99
const nop = false
1010
const errors = []
1111
return new Autolinks(nop, github, repo, config, log, errors)

test/unit/lib/plugins/branches.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const Branches = require('../../../../lib/plugins/branches')
66
describe('Branches', () => {
77
let github
88
const log = jest.fn()
9+
log.info = jest.fn()
910
log.debug = jest.fn()
1011
log.error = jest.fn()
1112

test/unit/lib/plugins/collaborators.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ describe('Collaborators', () => {
44
let github
55

66
function configure (config) {
7-
const log = { debug: jest.fn(), error: console.error }
7+
const log = { ...console, debug: jest.fn() }
88
return new Collaborators(undefined, github, { owner: 'bkeepers', repo: 'test' }, config, log)
99
}
1010

test/unit/lib/plugins/custom_properties.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('CustomProperties', () => {
1919
// ]
2020
// })
2121
}
22-
log = { debug: jest.fn(), error: console.error }
22+
log = { ...console, debug: jest.fn() }
2323
})
2424

2525
describe('sync', () => {

test/unit/lib/plugins/labels.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('Labels', () => {
2626
updateLabel: jest.fn().mockImplementation(() => Promise.resolve())
2727
}
2828
}
29-
log = { debug: jest.fn(), error: console.error }
29+
log = { ...console, debug: jest.fn() }
3030
})
3131

3232
describe('sync', () => {

test/unit/lib/plugins/repository.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ describe('Repository', () => {
1313
}
1414
}
1515
const log = jest.fn()
16+
log.info = jest.fn()
1617
log.debug = jest.fn()
1718
log.error = jest.fn()
1819

test/unit/lib/plugins/rulesets.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ function generateResponseRuleset(id, name, conditions, checks, org=false) {
8585
describe('Rulesets', () => {
8686
let github
8787
const log = jest.fn()
88+
log.info = jest.fn()
8889
log.debug = jest.fn()
8990
log.error = jest.fn()
9091

test/unit/lib/plugins/teams.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('Teams', () => {
1515
const org = 'bkeepers'
1616

1717
function configure (config) {
18-
const log = { debug: jest.fn(), error: console.error }
18+
const log = { ...console, debug: jest.fn() }
1919
const errors = []
2020
return new Teams(undefined, github, { owner: 'bkeepers', repo: 'test' }, config, log, errors)
2121
}

0 commit comments

Comments
 (0)