Timo Hocker 64d4f00629
Some checks failed
continuous-integration/drone/push Build is failing
blacklist with automatic garbage collector
2022-09-09 15:49:53 +02:00

14 lines
398 B
TypeScript

import { generate_token_id, parse_token_id } from '../../lib/token_id';
describe ('token_id', () => {
it ('should always generate valid tokens', () => {
for (let i = 0; i < 1000; i++) {
const date = new Date;
const token_id = generate_token_id (new Date);
const parsed = parse_token_id (token_id);
expect (parsed.valid_until)
.toEqual (date);
}
});
});