Skip to content

Commit

Permalink
test: mock useSettings
Browse files Browse the repository at this point in the history
Mocked useSettings to rectify failing test
  • Loading branch information
EthanFreestone committed Mar 1, 2024
1 parent 28d2d16 commit 5724de3
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ import { useTypes } from '../../../common/hooks';

jest.mock('../../../common/hooks', () => ({
useTypes: jest.fn(),
useSettings: jest.fn(() => ([
{
id: 'f2b84177-d85a-4b0c-93dd-279e8f9d1d42',
module: 'ORGANIZATIONS',
configName: 'number_generator',
enabled: true,
value: '{"vendorGeneratorSetting":"useBoth"}',
},
])),
}));

const TestForm = stripesFinalForm({})(
Expand Down

0 comments on commit 5724de3

Please sign in to comment.