Files
shields/services/codeship/codeship.spec.js
chris48s 13d75e0607 upgrade to prettier 2 (#5051)
* arrowParens: avoid
* remove trailingComma setting
2020-05-05 21:07:43 +01:00

24 lines
767 B
JavaScript

'use strict'
const { test, given } = require('sazerac')
const Codeship = require('./codeship.service')
const pending = { message: 'pending', label: undefined, color: undefined }
const notBuilt = { message: 'not built', label: undefined, color: undefined }
describe('Codeship', function () {
test(Codeship.render, () => {
given({ status: 'testing' }).expect(pending)
given({ status: 'waiting' }).expect(pending)
given({ status: 'initiated' }).expect(pending)
given({ status: 'stopped' }).expect(notBuilt)
given({ status: 'ignored' }).expect(notBuilt)
given({ status: 'blocked' }).expect(notBuilt)
given({ status: 'infrastructure_failure' }).expect({
message: 'failing',
color: 'red',
label: undefined,
})
})
})