mirror of
https://github.com/gethomepage/homepage.git
synced 2026-02-07 08:20:53 +08:00
lint
This commit is contained in:
@@ -339,7 +339,7 @@ describe("pages/index Index routing + SWR branches", () => {
|
|||||||
localStorage.setItem("hash", "old-hash");
|
localStorage.setItem("hash", "old-hash");
|
||||||
|
|
||||||
const fetchSpy = vi.fn(async () => ({ ok: true }));
|
const fetchSpy = vi.fn(async () => ({ ok: true }));
|
||||||
// eslint-disable-next-line no-global-assign
|
|
||||||
fetch = fetchSpy;
|
fetch = fetchSpy;
|
||||||
|
|
||||||
let reloadSpy;
|
let reloadSpy;
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ describe("components/quicklaunch", () => {
|
|||||||
const fetchSpy = vi.fn(async () => ({
|
const fetchSpy = vi.fn(async () => ({
|
||||||
json: async () => ["test", ["test 1", "test 2", "test 3", "test 4", "test 5"]],
|
json: async () => ["test", ["test 1", "test 2", "test 3", "test 4", "test 5"]],
|
||||||
}));
|
}));
|
||||||
// eslint-disable-next-line no-global-assign
|
|
||||||
fetch = fetchSpy;
|
fetch = fetchSpy;
|
||||||
|
|
||||||
renderWithProviders(<Wrapper />, {
|
renderWithProviders(<Wrapper />, {
|
||||||
@@ -315,7 +315,6 @@ describe("components/quicklaunch", () => {
|
|||||||
|
|
||||||
expect(input).toHaveValue("test 1");
|
expect(input).toHaveValue("test 1");
|
||||||
|
|
||||||
// eslint-disable-next-line no-global-assign
|
|
||||||
fetch = originalFetch;
|
fetch = originalFetch;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ describe("components/widgets/search", () => {
|
|||||||
const fetchSpy = vi.fn(async () => ({
|
const fetchSpy = vi.fn(async () => ({
|
||||||
json: async () => ["hel", ["hello", "help", "helm", "helium", "held"]],
|
json: async () => ["hel", ["hello", "help", "helm", "helium", "held"]],
|
||||||
}));
|
}));
|
||||||
// eslint-disable-next-line no-global-assign
|
|
||||||
fetch = fetchSpy;
|
fetch = fetchSpy;
|
||||||
|
|
||||||
renderWithProviders(<Search options={{ provider: ["google"], showSearchSuggestions: true, target: "_self" }} />, {
|
renderWithProviders(<Search options={{ provider: ["google"], showSearchSuggestions: true, target: "_self" }} />, {
|
||||||
@@ -192,7 +192,7 @@ describe("components/widgets/search", () => {
|
|||||||
expect(openSpy).toHaveBeenCalledWith("https://www.google.com/search?q=hello", "_self");
|
expect(openSpy).toHaveBeenCalledWith("https://www.google.com/search?q=hello", "_self");
|
||||||
|
|
||||||
openSpy.mockRestore();
|
openSpy.mockRestore();
|
||||||
// eslint-disable-next-line no-global-assign
|
|
||||||
fetch = originalFetch;
|
fetch = originalFetch;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
import { timingSafeEqual } from "node:crypto";
|
||||||
|
|
||||||
import NextAuth from "next-auth";
|
import NextAuth from "next-auth";
|
||||||
import CredentialsProvider from "next-auth/providers/credentials";
|
import CredentialsProvider from "next-auth/providers/credentials";
|
||||||
import { timingSafeEqual } from "node:crypto";
|
|
||||||
|
|
||||||
const authEnabled = Boolean(process.env.HOMEPAGE_AUTH_ENABLED);
|
const authEnabled = Boolean(process.env.HOMEPAGE_AUTH_ENABLED);
|
||||||
const issuer = process.env.HOMEPAGE_OIDC_ISSUER;
|
const issuer = process.env.HOMEPAGE_OIDC_ISSUER;
|
||||||
|
|||||||
Reference in New Issue
Block a user