Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test('got a blocking label in multiple labels', async () => {
client.mockReturnValue({
repo: jest.fn((params) => {
expect(params).toBe('foo/bar')
return {
statusAsync: jest.fn((commit, payload) => {
expect(commit).toBe('ee55a1223ce20c3e7cb776349cb7f8efb7b88511')
expect(payload.state).toBe('failure')
expect(payload.context).toBe('20 Minutes - Label validation')
expect(payload.description).toBeDefined()
}),
}
}),
})
const callback = jest.fn()
const githubEvent = {
pull_request: {
test('body and title are OK', async () => {
client.mockReturnValue({
repo: jest.fn((params) => {
expect(params).toBe('foo/bar')
return {
statusAsync: jest.fn((commit, payload) => {
expect(commit).toBe('ee55a1223ce20c3e7cb776349cb7f8efb7b88511')
expect(payload.state).toBe('success')
expect(payload.context).toBe('20 Minutes - PR Specification')
expect(payload.description).toBeDefined()
}),
}
}),
})
const callback = jest.fn()
const githubEvent = {
pull_request: {