storj/web/satellite/tests/unit/utils/validation.spec.ts
Jeremy Wharton 6e866856c4 web/satellite: remove unused references to meta config values
All values derived from meta tag config values have been removed.
They were unused because references to them were modified to instead
refer to the frontend config fetched through the satellite API.

References #5494

Change-Id: Iab6c5e18eac85e2f757e9e731e23239fa267ee0a
2023-04-14 14:09:23 -05:00

25 lines
900 B
TypeScript

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
import { Validator } from '@/utils/validation';
describe('validation', (): void => {
it('email regex works correctly', () => {
const testString1 = 'test';
const testString2 = ' ';
const testString3 = 'test@';
const testString4 = 'test.test';
const testString5 = 'test1@23.3';
const testString6 = '';
const testString7 = '@teSTt.1123';
expect(Validator.email(testString1)).toBe(false);
expect(Validator.email(testString2)).toBe(false);
expect(Validator.email(testString3)).toBe(false);
expect(Validator.email(testString4)).toBe(false);
expect(Validator.email(testString5)).toBe(true);
expect(Validator.email(testString6)).toBe(false);
expect(Validator.email(testString7)).toBe(true);
});
});