From 9d0cc45cffd3a373492bc842ba54a7254f7c509f Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 16 Feb 2022 11:45:01 +0200 Subject: [PATCH] fix: Fix util package tests. --- .../src/__snapshots__/ErrorBoundary.test.js.snap | 2 +- .../block-utils/src/__snapshots__/createIcon.test.js.snap | 7 +++++++ packages/utils/node-utils/src/getConfigFromEnv.test.js | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/utils/block-utils/src/__snapshots__/ErrorBoundary.test.js.snap b/packages/utils/block-utils/src/__snapshots__/ErrorBoundary.test.js.snap index fddfa309e..494202fcf 100644 --- a/packages/utils/block-utils/src/__snapshots__/ErrorBoundary.test.js.snap +++ b/packages/utils/block-utils/src/__snapshots__/ErrorBoundary.test.js.snap @@ -85,7 +85,7 @@ exports[`display fallback component on error generated by child 1`] = ` `; -exports[`display no error message on error generated by child 1`] = ``; +exports[`display no error message on error generated by child 1`] = `null`; exports[`no error 1`] = `
diff --git a/packages/utils/block-utils/src/__snapshots__/createIcon.test.js.snap b/packages/utils/block-utils/src/__snapshots__/createIcon.test.js.snap index a0e4fca7e..f5e838d6c 100644 --- a/packages/utils/block-utils/src/__snapshots__/createIcon.test.js.snap +++ b/packages/utils/block-utils/src/__snapshots__/createIcon.test.js.snap @@ -21,6 +21,7 @@ exports[`Icon onClick.loading false 1`] = ` class="emotion-0" data-testid="AiIcon" id="test-id" + title="AiIcon" /> `; @@ -29,6 +30,7 @@ exports[`Icon onClick.loading true 1`] = ` class="emotion-0" data-testid="AiOutlineLoading3Quarters" id="test-id" + title="AiIcon" /> `; @@ -37,6 +39,7 @@ exports[`Icon properties string 1`] = ` class="emotion-0" data-testid="AiIcon" id="test-id" + title="AiIcon" /> `; @@ -45,6 +48,7 @@ exports[`Icon properties.name 1`] = ` class="emotion-0" data-testid="AiIcon" id="test-id" + title="AiIcon" /> `; @@ -54,6 +58,7 @@ exports[`Icon properties.name error 1`] = ` color="#F00" data-testid="AiOutlineExclamationCircle" id="test-id" + title="ErrorIcon" /> `; @@ -83,6 +88,7 @@ exports[`Icon properties.spin 1`] = ` class="emotion-0 emotion-1" data-testid="AiIcon" id="test-id" + title="AiIcon" /> `; @@ -95,5 +101,6 @@ exports[`Icon properties.style 1`] = ` class="emotion-0" data-testid="AiIcon" id="test-id" + title="AiIcon" /> `; diff --git a/packages/utils/node-utils/src/getConfigFromEnv.test.js b/packages/utils/node-utils/src/getConfigFromEnv.test.js index 4dd41c09e..e00bad158 100644 --- a/packages/utils/node-utils/src/getConfigFromEnv.test.js +++ b/packages/utils/node-utils/src/getConfigFromEnv.test.js @@ -27,7 +27,8 @@ test('Get config from env', () => { LOWDEFY_SERVER_BUILD_DIRECTORY: 'build', LOWDEFY_SERVER_PUBLIC_DIRECTORY: 'public', LOWDEFY_SERVER_PORT: '8080', - LOWDEFY_SERVER_BASE_PATH: 'base', + LOWDEFY_BASE_PATH: 'base', + LOWDEFY_SERVER_LOG_LEVEL: 'verbose', OTHER_VAR: 'other', ANOTHER_VAR: 'another', ASDF_GHJK: 'asdfghjk', @@ -35,6 +36,7 @@ test('Get config from env', () => { const config = getConfigFromEnv(); expect(config).toEqual({ buildDirectory: 'build', + logLevel: 'verbose', publicDirectory: 'public', port: 8080, basePath: 'base',