From a81ee625e3edf00c6642b9e9eee94fd52441b827 Mon Sep 17 00:00:00 2001 From: Lora Rusinouskaya Date: Fri, 13 Oct 2023 20:09:39 -0400 Subject: [PATCH] test: :white_check_mark: add a spec for useMovex hook --- .../movex-react/src/specs/hooks/useMovex.spec.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 libs/movex-react/src/specs/hooks/useMovex.spec.ts diff --git a/libs/movex-react/src/specs/hooks/useMovex.spec.ts b/libs/movex-react/src/specs/hooks/useMovex.spec.ts new file mode 100644 index 00000000..25f95569 --- /dev/null +++ b/libs/movex-react/src/specs/hooks/useMovex.spec.ts @@ -0,0 +1,16 @@ +import { renderHook } from '@testing-library/react'; +import { useMovex } from '../../lib/hooks'; + +describe('useMovex', () => { + test('it should return the correct context value', () => { + const movexConfigMock = { + resources: {}, + }; + + const { result } = renderHook(() => useMovex(movexConfigMock)); + + expect(result.current.movex).toBeUndefined(); + expect(result.current.clientId).toBeUndefined(); + expect(result.current.connected).toEqual(false); + }); +});