push
github
169 of 178 branches covered (94.94%)
Branch coverage included in aggregate %.
361 of 361 new or added lines in 15 files covered. (100.0%)
2089 of 4013 relevant lines covered (52.06%)
1.03 hits per line
|
import { defaultFrontendFlags } from '../../../plugins/flags/frontend-flags.js' |
|
|
|
2✔ |
|
export async function getFlags (fastify, opts) { |
|
|
fastify.get( |
2✔ |
|
'/',
|
2✔ |
|
{ |
2✔ |
|
schema: {
|
2✔ |
|
response: {
|
2✔ |
|
200: {
|
2✔ |
|
type: 'object', |
2✔ |
|
properties: {
|
2✔ |
|
...defaultFrontendFlags |
2✔ |
|
} |
2✔ |
|
} |
2✔ |
|
} |
2✔ |
|
} |
2✔ |
|
}, |
2✔ |
|
// Get flags
|
2✔ |
|
async function getFlagsHandler (request, reply) { |
2✔ |
|
const frontendFlags = await fastify.getFlags({ frontend: true, backend: false }) |
× |
|
return frontendFlags
|
× |
|
} |
× |
|
) |
2✔ |
|
} |
2✔ |