Files
parenthese/backend/test/password-variants.test.ts
T

19 lines
711 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { describe, expect, it } from 'vitest'
import { sharePasswordVariants } from '../src/lib/password-variants'
describe('sharePasswordVariants', () => {
it('ajoute la forme droite et la forme typographique de l\'apostrophe', () => {
expect(sharePasswordVariants('Lavenuedel’Avenir')).toContain("Lavenuedel'Avenir")
expect(sharePasswordVariants("Lavenuedel'Avenir")).toContain('Lavenuedel’Avenir')
})
it('retire les espaces autour sans toucher à la casse', () => {
expect(sharePasswordVariants(' Soleil ')).toEqual([' Soleil ', 'Soleil'])
})
it('ne change rien à un mot de passe simple', () => {
expect(sharePasswordVariants('123soleil')).toEqual(['123soleil'])
})
})