14 lines
375 B
TypeScript
14 lines
375 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { emailValidation } from './validation';
|
|
|
|
describe('validation', () => {
|
|
it('should be defined', () => {
|
|
expect(emailValidation).toBeDefined();
|
|
});
|
|
|
|
it('should validate emails', () => {
|
|
expect(emailValidation('bad').isValid).toBe(false);
|
|
expect(emailValidation('a@b.com').isValid).toBe(true);
|
|
});
|
|
});
|