1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-10 17:53:36 +02:00

chore: pretty-print features

This commit is contained in:
Thomas Heartman 2023-01-04 11:04:30 +01:00
parent 3d0bd8b940
commit b4676b0ecc
No known key found for this signature in database
GPG Key ID: 47CFBB2D87C87664

View File

@ -271,6 +271,9 @@ describe('Playground API E2E', () => {
), ),
); );
const pretty = (x: any) =>
JSON.stringify(x, null, 2);
ctx.log( ctx.log(
`I expected the number of mapped toggles (${ `I expected the number of mapped toggles (${
body.features.length body.features.length
@ -278,11 +281,11 @@ describe('Playground API E2E', () => {
features.length features.length
}), but that was not the case. }), but that was not the case.
The mapped toggles are ${JSON.stringify(body.features)}. The mapped toggles are ${pretty(body.features)}.
The generated toggles are ${JSON.stringify(features)}. The generated toggles are ${pretty(features)}.
The following features are in the longer list, but not in the shorter: ${JSON.stringify( The following features are in the longer list, but not in the shorter: ${pretty(
extraFeatures, extraFeatures,
)} )}
`, `,