We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a686a0e commit 39d99a4Copy full SHA for 39d99a4
packages/mui-component-mapper/src/tests/helpers.test.js
@@ -0,0 +1,14 @@
1
+import { validationError } from '../form-fields/helpers';
2
+
3
+describe('form fields helpers', () => {
4
+ describe('validationError', () => {
5
+ it('returns meta.error when validateOnMount', () => {
6
+ expect(validationError({ error: 'error' }, true)).toEqual('error');
7
+ });
8
9
+ it('returns meta.error || meta.touched when validateOnMount', () => {
10
+ expect(validationError({ error: 'error', touched: false }, false)).toEqual(false);
11
+ expect(validationError({ error: 'error', touched: true }, false)).toEqual('error');
12
13
14
+});
0 commit comments