You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailchat/packages/design/components/WebMetaForm/__tests__/utils.spec.ts

22 lines
449 B
TypeScript

import { getValidateStatus } from '../utils';
describe('getValidateStatus', () => {
test('enter undefined', () => {
const status = getValidateStatus(undefined);
expect(status).toBe('');
});
test('enter empty string', () => {
const status = getValidateStatus('');
expect(status).toBe('');
});
test('enter string', () => {
const status = getValidateStatus('any string');
expect(status).toBe('error');
});
});