build: add jest, tests
This commit is contained in:
7
tests/randomInRange.test.ts
Normal file
7
tests/randomInRange.test.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { expect, test } from "@jest/globals";
|
||||
import { randomInRange } from "../src";
|
||||
|
||||
test("generates a random number in range", () => {
|
||||
const randomNumber = randomInRange(1, 100);
|
||||
expect(randomNumber >= 1 && randomNumber <= 100).toBeTruthy();
|
||||
});
|
||||
Reference in New Issue
Block a user