mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-13 03:35:52 +01:00
62c24b6321
* 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'");
|
|
});
|
|
});
|
|
});
|