-
-
Notifications
You must be signed in to change notification settings - Fork 756
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b46bdaa
commit 7766328
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { generate } from './generator'; | ||
|
||
describe('Testing mock generate util', () => { | ||
test('should return a Promise', async () => { | ||
const result = generate(); | ||
expect(result).toBeInstanceOf(Promise); | ||
}); | ||
|
||
test('should resolve to a Uint8Array', async () => { | ||
const result = await generate(); | ||
expect(result).toBeInstanceOf(Uint8Array); | ||
}); | ||
|
||
test('should resolve to a Uint8Array with correct values', async () => { | ||
const result = await generate(); | ||
expect(result).toEqual(new Uint8Array([10, 20, 30, 40, 50])); | ||
}); | ||
}); |