Skip to content

Commit

Permalink
Merge pull request #132 from Arol15/spec-for-useMovex
Browse files Browse the repository at this point in the history
[libs/movex-react] Add spec for useMovex hook
  • Loading branch information
GabrielCTroia authored Oct 20, 2023
2 parents 1469d73 + 08e9554 commit 118f362
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions libs/movex-react/src/specs/hooks/useMovex.spec.ts
Original file line number Diff line number Diff line change
@@ -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);
});
});

0 comments on commit 118f362

Please sign in to comment.