Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.

Commit 0d51466

Browse files
committed
Update validation test file because of object structure change
1 parent 763fde4 commit 0d51466

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/canner/test/hocs/validation.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ describe('withValidation', () => {
8888
{...props}
8989
onDeploy={jest.fn().mockImplementation((_, fn) => (fn(result)))}
9090
required
91-
validation={{pattern: '^http://[.]+'}}
91+
validation={{schema: {pattern: '^http://[.]+'}}}
9292
/>);
9393
expect(wrapper.state()).toMatchObject({
9494
error: true,
@@ -109,7 +109,7 @@ describe('withValidation', () => {
109109
{...props}
110110
onDeploy={jest.fn().mockImplementation((_, fn) => (fn(result)))}
111111
required
112-
validation={{pattern: '^http://[.]+', errorMessage}}
112+
validation={{schema: {pattern: '^http://[.]+'}, errorMessage}}
113113
/>);
114114
expect(wrapper.state()).toMatchObject({
115115
error: true,
@@ -128,7 +128,7 @@ describe('withValidation', () => {
128128
const wrapper = mount(<WrapperComponent
129129
{...props}
130130
onDeploy={jest.fn().mockImplementation((_, fn) => (fn(result)))}
131-
validation={{pattern: '^http://[.]+'}}
131+
validation={{schema: {pattern: '^http://[.]+'}}}
132132
/>);
133133
expect(wrapper.state()).toMatchObject({
134134
error: false,

0 commit comments

Comments
 (0)