mirror of
https://github.com/coder/code-server.git
synced 2026-05-11 14:57:26 +02:00
refactor: add constants.ts with PASSWORD, etc
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user