* Add Netlify (fixed #3129) * Update services/netlify/netlify.service.js Co-Authored-By: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> * Remove pattern from return statement Co-Authored-By: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> * Add Netlify namedLogo to return statement Co-Authored-By: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> * Change label from "build" to "netlify" in test Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com> * Change label from "build" to "netlify" in test Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com> * test(netlify): Fix failing tests Co-Authored-By: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> * Fix "netlify" spelling in label Co-Authored-By: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> * Use const instead of let for result Co-Authored-By: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> * Change "project not found" to "not found" * Use unknown as fallback response Co-Authored-By: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> * Add documentation for project ID, remove commented part * Fix documentation key in example
20 lines
565 B
JavaScript
20 lines
565 B
JavaScript
'use strict'
|
|
|
|
const { test, given } = require('sazerac')
|
|
const Netlify = require('./netlify.service')
|
|
|
|
const building = { message: 'building', label: undefined, color: 'yellow' }
|
|
const notBuilt = { message: 'not built', label: undefined, color: undefined }
|
|
|
|
describe('Netlify', function() {
|
|
test(Netlify.render, () => {
|
|
given({ status: 'building' }).expect(building)
|
|
given({ status: 'stopped' }).expect(notBuilt)
|
|
given({ status: 'infrastructure_failure' }).expect({
|
|
message: 'failing',
|
|
color: 'red',
|
|
label: undefined,
|
|
})
|
|
})
|
|
})
|