From d8514d20f67687df10bf1f7b7b7e3c15a90c2330 Mon Sep 17 00:00:00 2001 From: Wenderson Pires Date: Fri, 7 Apr 2023 08:51:08 -0300 Subject: [PATCH] fix mock issue that was preventing the viewer height sync --- src/constants.ts | 4 ++-- src/request/mock.ts | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index d1e1195..4ffa46c 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -8,5 +8,5 @@ export const REQUEST_KEYS = { } export const LOCAL_MOCK_KEYS = { - INITIAL_PAYLOAD: 'nsb:mock:initial-payload' -} \ No newline at end of file + INITIAL_PAYLOAD: 'nsb:mock:initial-payload', +} diff --git a/src/request/mock.ts b/src/request/mock.ts index b46f319..c1121be 100644 --- a/src/request/mock.ts +++ b/src/request/mock.ts @@ -5,13 +5,13 @@ import isLocalDev from '../utils/isLocalDev' import { loremIpsum, randName, randUserName } from '../utils/faker/elements' /** - * Global mock state + * Global Mock State + */ +export const globalMock: Record = {} + +/** + * Mock Options */ -export const globalMock: Record = { - // Minimum mocked answers to make it works locally (localhost) - // auto inject "nsb:navigation:sync-content-height" mock - [REQUEST_KEYS.NAVIGATION_SYNC_CONTENT_HIGHT_VIEWER]: () => null, -} let mockOptions: { delay: number } = { delay: 500 } /** @@ -53,7 +53,7 @@ export const createMockUser = (defaultValues?: { /** * Mock the `initialPayload` prop - * @param initialPayload + * @param initialPayload */ export const mockInitialPayload = (initialPayload: Record) => { globalMock[LOCAL_MOCK_KEYS.INITIAL_PAYLOAD] = () => initialPayload