From d436d8dc135b1607570d2502187c6c92fa896dc5 Mon Sep 17 00:00:00 2001 From: ClaudiaGivan Date: Mon, 27 May 2024 18:16:35 +0300 Subject: [PATCH] Update the build config actions versions - add logs --- test/graphs/cfd/CFDRenderer.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/graphs/cfd/CFDRenderer.test.js b/test/graphs/cfd/CFDRenderer.test.js index 7e2298f..9274bfa 100644 --- a/test/graphs/cfd/CFDRenderer.test.js +++ b/test/graphs/cfd/CFDRenderer.test.js @@ -1,7 +1,6 @@ import CFDRenderer from '../../../src/graphs/cfd/CFDRenderer.js'; import cfdGraphOutput from '../../testData/CFDGraphExpectedOutput.js'; import metricsOutput from '../../testData/CFDRendererExpectedOutput.js'; -import {diff} from 'jest-diff'; describe('CFDRenderer', () => { let cfdRenderer; @@ -17,6 +16,7 @@ describe('CFDRenderer', () => { //Act const metrics = cfdRenderer.computeMetrics(date,cumulativeCount); //Assert - expect(JSON.stringify(metrics, null, 2)).toEqual(JSON.stringify(metricsOutput, null, 2)); + const normalizeJSON = (obj) => JSON.stringify(obj, Object.keys(obj).sort()); + expect(normalizeJSON(metrics)).toEqual(normalizeJSON(metricsOutput)); }); });