Merging this separately so the commit with the tooling change is readable. This is a follow-on to #1167 which turned prettier on.
16 lines
485 B
JavaScript
16 lines
485 B
JavaScript
'use strict'
|
|
|
|
const { expect } = require('chai')
|
|
const { checkErrorResponse } = require('./github-helpers')
|
|
|
|
describe('GitHub Error Handler', function() {
|
|
it('makes not found badge when 422 is returned', function() {
|
|
const badgeData = { text: [] }
|
|
expect(
|
|
checkErrorResponse(badgeData, null, { statusCode: 422 }, 'repo not found')
|
|
).to.be.true
|
|
expect(badgeData.text[1]).to.equal('repo not found')
|
|
expect(badgeData.colorscheme).to.equal('lightgrey')
|
|
})
|
|
})
|