mirror of
https://github.com/supabase/supabase.git
synced 2026-05-20 04:23:53 +08:00
* Break down new project page into smaller components * Fix types * Address comments * Add min length check for project name in project settings * Fix tests
11 lines
530 B
TypeScript
11 lines
530 B
TypeScript
import { expect, test } from 'vitest'
|
|
import { DATABASE_PASSWORD_REGEX } from './ProjectCreation.constants'
|
|
|
|
test('Regex test to surface if password contains @, : or /', () => {
|
|
expect(!'teststring'.match(DATABASE_PASSWORD_REGEX)).toEqual(false)
|
|
expect(!'test@string'.match(DATABASE_PASSWORD_REGEX)).toEqual(true)
|
|
expect(!'te:ststring'.match(DATABASE_PASSWORD_REGEX)).toEqual(true)
|
|
expect(!`tests/tring`.match(DATABASE_PASSWORD_REGEX)).toEqual(true)
|
|
expect(!'!#$%^&*()'.match(DATABASE_PASSWORD_REGEX)).toEqual(false)
|
|
})
|