mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-23 22:27:34 -05:00
62c24b6321
* feat: add passwordValidationRegex property * chore: improve validation * Update validation-utilts.spec.ts * Update validation-utilts.spec.ts * chore: remove code
16 lines
546 B
TypeScript
16 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'");
|
|
});
|
|
});
|
|
});
|