Skip to content
Snippets Groups Projects
Unverified Commit bb1157c6 authored by Pierre-Yves Bigourdan's avatar Pierre-Yves Bigourdan Committed by GitHub
Browse files

Fix [EcologiCarbonOffset] test (#10374)

parent a202a09e
No related branches found
No related tags found
No related merge requests found
import { createServiceTester } from '../tester.js' import { createServiceTester } from '../tester.js'
import { withRegex } from '../test-validators.js' import { isMetricWithPattern } from '../test-validators.js'
export const t = await createServiceTester() export const t = await createServiceTester()
t.create('request for existing username') t.create('request for existing username')
.get('/ecologi.json') .get('/ecologi.json')
.expectBadge({ .expectBadge({
label: 'carbon offset', label: 'carbon offset',
message: withRegex(/[\d.]+ tonnes/), message: isMetricWithPattern(/ tonnes/),
}) })
t.create('invalid username').get('/non-existent-username.json').expectBadge({ t.create('invalid username').get('/non-existent-username.json').expectBadge({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment