1
0
mirror of https://github.com/badges/shields.git synced 2025-11-30 06:21:32 +03:00

Add SymfonyInsight stars badge, run [SymfonyInsight sensiolabs amo chrome-web-store redmine spigetratings vaadin-directory visualstudiomarketplacerating wordpress] (#2971)

* feat: added stars badge for symfony insight

* refactor: changed symfony star determination logic

* feat: updating symfony to handle old scan scenarios

* feat: updated symfony insight to handle older projects

* tests: removed another test for symfony insight per request
This commit is contained in:
Caleb Cartwright
2019-02-20 17:15:31 -06:00
committed by GitHub
parent 96d48dc486
commit a4bd3f5fd6
14 changed files with 827 additions and 608 deletions

View File

@@ -3,6 +3,8 @@
const sinon = require('sinon')
const serverSecrets = require('../../lib/server-secrets')
const sampleProjectUuid = '45afb680-d4e6-4e66-93ea-bcfa79eb8a87'
function createMockResponse({ status = 'finished', grade, violations }) {
let response = `
<project>
@@ -112,7 +114,21 @@ function prepLiveTest() {
}
}
function createTest(
t,
title,
{ withMockCreds = true } = { withMockCreds: true }
) {
const result = t.create(title)
if (withMockCreds) {
result.before(mockSymfonyInsightCreds)
result.finally(restore)
}
return result
}
module.exports = {
sampleProjectUuid,
runningMockResponse,
platinumMockResponse,
goldMockResponse,
@@ -131,4 +147,5 @@ module.exports = {
minorViolation,
infoViolation,
multipleViolations,
createTest,
}