Files
shields/services/netlify/netlify.tester.js
Anand Chowdhary 58a5239e18 Add [Netlify] (fixed #3129) (#3953)
* 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
2019-09-06 12:21:17 -05:00

16 lines
428 B
JavaScript

'use strict'
const { isBuildStatus } = require('../build-status')
const t = (module.exports = require('../tester').createServiceTester())
t.create('netlify (valid, no branch)')
.get('/e6d5a4e0-dee1-4261-833e-2f47f509c68f.json')
.expectBadge({
label: 'netlify',
message: isBuildStatus,
})
t.create('netlify (repo not found)')
.get('/not-a-repo.json')
.expectBadge({ label: 'netlify', message: 'not found' })