blob: 065ad7f0f865b859624fef44aafee29942ab90ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import generateChallenge from './generateChallenge';
test('should return a buffer of at least 32 bytes', () => {
const challenge = generateChallenge();
expect(challenge.byteLength).toBeGreaterThanOrEqual(32);
});
test('should return random bytes on each execution', () => {
const challenge1 = generateChallenge();
const challenge2 = generateChallenge();
expect(challenge1).not.toEqual(challenge2);
});
|