1
0
mirror of https://github.com/badges/shields.git synced 2025-11-02 04:13:20 +03:00
Files
shields/services/symfony/symfony-insight-violations.tester.js
2021-07-09 12:53:55 +01:00

16 lines
718 B
JavaScript

import { createServiceTester } from '../tester.js'
import { withRegex } from '../test-validators.js'
import { sampleProjectUuid, noSymfonyToken } from './symfony-test-helpers.js'
export const t = await createServiceTester()
t.create('valid project violations')
.skipWhen(noSymfonyToken)
.get(`/${sampleProjectUuid}.json`)
.timeout(15000)
.expectBadge({
label: 'violations',
message: withRegex(
/0|\d* critical|\d* critical, \d* major|\d* critical, \d* major, \d* minor|\d* critical, \d* major, \d* minor, \d* info|\d* critical, \d* minor|\d* critical, \d* info|\d* major|\d* major, \d* minor|\d* major, \d* minor, \d* info|\d* major, \d* info|\d* minor|\d* minor, \d* info|\d* info/
),
})