mirror of https://github.com/msgbyte/tailchat
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.
22 lines
449 B
TypeScript
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');
|
|
});
|
|
});
|