From b4676b0ecc6a25708adab36069d43c3e39bb51a4 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Wed, 4 Jan 2023 11:04:30 +0100 Subject: [PATCH] chore: pretty-print features --- src/test/e2e/api/admin/playground.e2e.test.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/test/e2e/api/admin/playground.e2e.test.ts b/src/test/e2e/api/admin/playground.e2e.test.ts index 9a32a53e2f..1f9329a991 100644 --- a/src/test/e2e/api/admin/playground.e2e.test.ts +++ b/src/test/e2e/api/admin/playground.e2e.test.ts @@ -271,6 +271,9 @@ describe('Playground API E2E', () => { ), ); + const pretty = (x: any) => + JSON.stringify(x, null, 2); + ctx.log( `I expected the number of mapped toggles (${ body.features.length @@ -278,11 +281,11 @@ describe('Playground API E2E', () => { features.length }), 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, )} `,