mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-21 07:29:37 +01:00

* feat: add passwordValidationRegex property * chore: improve validation * Update validation-utilts.spec.ts * Update validation-utilts.spec.ts * chore: remove code
17 lines
546 B
TypeScript
17 lines
546 B
TypeScript
import { createSessionToken, getAuthenticatedMessage } from '../src';
|
|
|
|
describe('Auth Utilities', () => {
|
|
describe('createSessionToken', () => {
|
|
test('should generate session token', () => {
|
|
expect(createSessionToken()).toHaveProperty('expires');
|
|
expect(createSessionToken().expires).toBeInstanceOf(Date);
|
|
});
|
|
});
|
|
|
|
describe('getAuthenticatedMessage', () => {
|
|
test('should generate user message token', () => {
|
|
expect(getAuthenticatedMessage('foo')).toEqual("you are authenticated as 'foo'");
|
|
});
|
|
});
|
|
});
|