refactor: add constants.ts with PASSWORD, etc

This commit is contained in:
Joe Previte
2021-02-12 12:08:34 -07:00
parent 5857b25079
commit b0fd55463b
6 changed files with 16 additions and 11 deletions

View File

@ -19,6 +19,7 @@ import {
} from "../src/common/util"
import { Cookie as CookieEnum } from "../src/node/routes/login"
import { hash } from "../src/node/util"
import { PASSWORD } from "./constants"
const dom = new JSDOM()
global.document = dom.window.document
@ -263,7 +264,6 @@ describe("util", () => {
describe("checkForCookie", () => {
it("should check if the cookie exists and has a value", () => {
const PASSWORD = "123supersecure!"
const fakeCookies: Cookie[] = [
{
name: CookieEnum.Key,
@ -286,7 +286,6 @@ describe("util", () => {
describe("createCookieIfDoesntExist", () => {
it("should create a cookie if it doesn't exist", () => {
const PASSWORD = "123supersecure"
const cookies: Cookie[] = []
const cookieToStore = {
name: CookieEnum.Key,