From 88bf0dff6786343d60ad93863cd0d3316075a6b0 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Wed, 3 Apr 2024 02:06:36 +0900 Subject: [PATCH] `TestValidator.equals()` to trace more detaily. --- packages/e2e/package.json | 2 +- packages/e2e/src/TestValidator.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/e2e/package.json b/packages/e2e/package.json index 55d3aaf75..aff2ea82e 100644 --- a/packages/e2e/package.json +++ b/packages/e2e/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/e2e", - "version": "0.4.2", + "version": "0.4.3", "description": "E2E test utilify functions", "main": "lib/index.js", "scripts": { diff --git a/packages/e2e/src/TestValidator.ts b/packages/e2e/src/TestValidator.ts index 878dbd5d5..418daf24b 100644 --- a/packages/e2e/src/TestValidator.ts +++ b/packages/e2e/src/TestValidator.ts @@ -68,7 +68,11 @@ export namespace TestValidator { const diff: string[] = json_equal_to(exception)(x)(y); if (diff.length) throw new Error( - `Bug on ${title}: found different values - [${diff.join(", ")}]`, + [ + `Bug on ${title}: found different values - [${diff.join(", ")}]:`, + "\n", + JSON.stringify({ x, y }, null, 2), + ].join("\n"), ); };