[test] reset-password

This commit is contained in:
Louis Lam
2021-10-16 01:33:44 +08:00
parent 7276f34d90
commit 4d26825cbe
2 changed files with 48 additions and 31 deletions

View File

@@ -1,11 +1,11 @@
const { genSecret } = require("../src/util");
beforeAll(() => {
});
const { genSecret, sleep } = require("../src/util");
describe("Test genSecret", () => {
beforeAll(() => {
});
it("should be correct length", () => {
let secret = genSecret(-1);
expect(secret).toEqual("");
@@ -34,4 +34,11 @@ describe("Test genSecret", () => {
expect(secret).toContain("A");
expect(secret).toContain("9");
});
});
describe("Test reset-password", () => {
it("should able to run", async () => {
await require("../extra/reset-password").main();
});
});