password reset

This commit is contained in:
2020-09-10 18:11:58 +02:00
parent f304463b46
commit 4d2d62d777
7 changed files with 87 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
import { validateRestaurant, toShortDate } from "./services";
import { toShortDate, generateNewPassword } from "./services";
jest.mock("@azure/storage-blob", () => {
return {
@@ -17,3 +17,8 @@ jest.mock("bcrypt", () => {
test("should return false for no date on input", () => {
expect(toShortDate()).toBe(false);
});
test("should generate random 10 characters long password", () => {
let generatedPass = generateNewPassword();
expect(generatedPass.length).toBe(10);
});