mirror of
https://github.com/gethomepage/homepage.git
synced 2026-09-21 11:35:49 -07:00
Chore(deps-dev): Bump vitest and vitest/coverage-v8 in the npm_and_yarn group across 1 directory (#6737)
Docker CI / Docker Build & Push (push) Has been cancelled
Lint / Linting Checks (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Release Drafter / Auto Label PR (push) Has been cancelled
Tests / vitest (1) (push) Has been cancelled
Tests / vitest (2) (push) Has been cancelled
Tests / vitest (3) (push) Has been cancelled
Tests / vitest (4) (push) Has been cancelled
Docker CI / Docker Build & Push (push) Has been cancelled
Lint / Linting Checks (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Release Drafter / Auto Label PR (push) Has been cancelled
Tests / vitest (1) (push) Has been cancelled
Tests / vitest (2) (push) Has been cancelled
Tests / vitest (3) (push) Has been cancelled
Tests / vitest (4) (push) Has been cancelled
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com> Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
+2
-2
@@ -54,7 +54,7 @@
|
||||
"@tailwindcss/postcss": "^4.1.18",
|
||||
"@testing-library/jest-dom": "^6.8.0",
|
||||
"@testing-library/react": "^16.3.0",
|
||||
"@vitest/coverage-v8": "^3.2.4",
|
||||
"@vitest/coverage-v8": "^4.1.8",
|
||||
"eslint": "^9.25.1",
|
||||
"eslint-config-next": "^15.5.11",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
@@ -70,7 +70,7 @@
|
||||
"tailwind-scrollbar": "^4.0.2",
|
||||
"tailwindcss": "^4.3.0",
|
||||
"typescript": "^5.7.3",
|
||||
"vitest": "^3.2.4"
|
||||
"vitest": "^4.1.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"osx-temperature-sensor": "^1.0.8"
|
||||
|
||||
Generated
+385
-612
File diff suppressed because it is too large
Load Diff
@@ -3,15 +3,15 @@
|
||||
import { render } from "@testing-library/react";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const { useSWR, Resource, Error } = vi.hoisted(() => ({
|
||||
const { useSWR, Resource, ErrorComponent } = vi.hoisted(() => ({
|
||||
useSWR: vi.fn(),
|
||||
Resource: vi.fn(() => <div data-testid="resource" />),
|
||||
Error: vi.fn(() => <div data-testid="error" />),
|
||||
ErrorComponent: vi.fn(() => <div data-testid="error" />),
|
||||
}));
|
||||
|
||||
vi.mock("swr", () => ({ default: useSWR }));
|
||||
vi.mock("../widget/resource", () => ({ default: Resource }));
|
||||
vi.mock("../widget/error", () => ({ default: Error }));
|
||||
vi.mock("../widget/error", () => ({ default: ErrorComponent }));
|
||||
|
||||
import Cpu from "./cpu";
|
||||
|
||||
@@ -50,6 +50,6 @@ describe("components/widgets/resources/cpu", () => {
|
||||
|
||||
render(<Cpu expanded />);
|
||||
|
||||
expect(Error).toHaveBeenCalled();
|
||||
expect(ErrorComponent).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
import { render } from "@testing-library/react";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const { useSWR, Resource, Error } = vi.hoisted(() => ({
|
||||
const { useSWR, Resource, ErrorComponent } = vi.hoisted(() => ({
|
||||
useSWR: vi.fn(),
|
||||
Resource: vi.fn(() => <div data-testid="resource" />),
|
||||
Error: vi.fn(() => <div data-testid="error" />),
|
||||
ErrorComponent: vi.fn(() => <div data-testid="error" />),
|
||||
}));
|
||||
|
||||
vi.mock("swr", () => ({ default: useSWR }));
|
||||
vi.mock("../widget/resource", () => ({ default: Resource }));
|
||||
vi.mock("../widget/error", () => ({ default: Error }));
|
||||
vi.mock("../widget/error", () => ({ default: ErrorComponent }));
|
||||
|
||||
import CpuTemp from "./cputemp";
|
||||
|
||||
@@ -48,6 +48,6 @@ describe("components/widgets/resources/cputemp", () => {
|
||||
|
||||
render(<CpuTemp expanded units="metric" />);
|
||||
|
||||
expect(Error).toHaveBeenCalled();
|
||||
expect(ErrorComponent).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
import { render } from "@testing-library/react";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const { useSWR, Resource, Error } = vi.hoisted(() => ({
|
||||
const { useSWR, Resource, ErrorComponent } = vi.hoisted(() => ({
|
||||
useSWR: vi.fn(),
|
||||
Resource: vi.fn(() => <div data-testid="resource" />),
|
||||
Error: vi.fn(() => <div data-testid="error" />),
|
||||
ErrorComponent: vi.fn(() => <div data-testid="error" />),
|
||||
}));
|
||||
|
||||
vi.mock("swr", () => ({ default: useSWR }));
|
||||
vi.mock("../widget/resource", () => ({ default: Resource }));
|
||||
vi.mock("../widget/error", () => ({ default: Error }));
|
||||
vi.mock("../widget/error", () => ({ default: ErrorComponent }));
|
||||
|
||||
import Disk from "./disk";
|
||||
|
||||
@@ -48,6 +48,6 @@ describe("components/widgets/resources/disk", () => {
|
||||
|
||||
render(<Disk options={{ disk: "/" }} expanded />);
|
||||
|
||||
expect(Error).toHaveBeenCalled();
|
||||
expect(ErrorComponent).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
import { render } from "@testing-library/react";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const { useSWR, Resource, Error } = vi.hoisted(() => ({
|
||||
const { useSWR, Resource, ErrorComponent } = vi.hoisted(() => ({
|
||||
useSWR: vi.fn(),
|
||||
Resource: vi.fn(() => <div data-testid="resource" />),
|
||||
Error: vi.fn(() => <div data-testid="error" />),
|
||||
ErrorComponent: vi.fn(() => <div data-testid="error" />),
|
||||
}));
|
||||
|
||||
vi.mock("swr", () => ({ default: useSWR }));
|
||||
vi.mock("../widget/resource", () => ({ default: Resource }));
|
||||
vi.mock("../widget/error", () => ({ default: Error }));
|
||||
vi.mock("../widget/error", () => ({ default: ErrorComponent }));
|
||||
|
||||
import Memory from "./memory";
|
||||
|
||||
@@ -48,6 +48,6 @@ describe("components/widgets/resources/memory", () => {
|
||||
|
||||
render(<Memory expanded />);
|
||||
|
||||
expect(Error).toHaveBeenCalled();
|
||||
expect(ErrorComponent).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
import { render } from "@testing-library/react";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const { useSWR, Resource, Error } = vi.hoisted(() => ({
|
||||
const { useSWR, Resource, ErrorComponent } = vi.hoisted(() => ({
|
||||
useSWR: vi.fn(),
|
||||
Resource: vi.fn(() => <div data-testid="resource" />),
|
||||
Error: vi.fn(() => <div data-testid="error" />),
|
||||
ErrorComponent: vi.fn(() => <div data-testid="error" />),
|
||||
}));
|
||||
|
||||
vi.mock("swr", () => ({ default: useSWR }));
|
||||
vi.mock("../widget/resource", () => ({ default: Resource }));
|
||||
vi.mock("../widget/error", () => ({ default: Error }));
|
||||
vi.mock("../widget/error", () => ({ default: ErrorComponent }));
|
||||
|
||||
import Network from "./network";
|
||||
|
||||
@@ -52,6 +52,6 @@ describe("components/widgets/resources/network", () => {
|
||||
|
||||
render(<Network options={{ network: "en0" }} />);
|
||||
|
||||
expect(Error).toHaveBeenCalled();
|
||||
expect(ErrorComponent).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
import { render } from "@testing-library/react";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const { useSWR, Resource, Error } = vi.hoisted(() => ({
|
||||
const { useSWR, Resource, ErrorComponent } = vi.hoisted(() => ({
|
||||
useSWR: vi.fn(),
|
||||
Resource: vi.fn(() => <div data-testid="resource" />),
|
||||
Error: vi.fn(() => <div data-testid="error" />),
|
||||
ErrorComponent: vi.fn(() => <div data-testid="error" />),
|
||||
}));
|
||||
|
||||
vi.mock("swr", () => ({ default: useSWR }));
|
||||
vi.mock("../widget/resource", () => ({ default: Resource }));
|
||||
vi.mock("../widget/error", () => ({ default: Error }));
|
||||
vi.mock("../widget/error", () => ({ default: ErrorComponent }));
|
||||
|
||||
import Uptime from "./uptime";
|
||||
|
||||
@@ -49,6 +49,6 @@ describe("components/widgets/resources/uptime", () => {
|
||||
|
||||
render(<Uptime />);
|
||||
|
||||
expect(Error).toHaveBeenCalled();
|
||||
expect(ErrorComponent).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -40,10 +40,12 @@ const { state, fs, yaml, config, Docker, dockerCfg, kubeCfg, kubeApi } = vi.hois
|
||||
default: vi.fn(),
|
||||
};
|
||||
|
||||
const Docker = vi.fn((conn) => ({
|
||||
listContainers: vi.fn(async () => state.dockerContainersByServer[conn?.serverName] ?? state.dockerContainers),
|
||||
listServices: vi.fn(async () => state.dockerServicesByServer[conn?.serverName] ?? state.dockerContainers),
|
||||
}));
|
||||
const Docker = vi.fn(function Docker(conn) {
|
||||
return {
|
||||
listContainers: vi.fn(async () => state.dockerContainersByServer[conn?.serverName] ?? state.dockerContainers),
|
||||
listServices: vi.fn(async () => state.dockerServicesByServer[conn?.serverName] ?? state.dockerContainers),
|
||||
};
|
||||
});
|
||||
|
||||
const dockerCfg = {
|
||||
default: vi.fn((serverName) => ({ conn: { serverName } })),
|
||||
|
||||
@@ -5,7 +5,7 @@ import createMockRes from "test-utils/create-mock-res";
|
||||
const { UrbackupServer, state, getServiceWidget } = vi.hoisted(() => {
|
||||
const state = { instances: [] };
|
||||
|
||||
const UrbackupServer = vi.fn((opts) => {
|
||||
const UrbackupServer = vi.fn(function UrbackupServer(opts) {
|
||||
const instance = {
|
||||
opts,
|
||||
getStatus: vi.fn(),
|
||||
@@ -46,7 +46,7 @@ describe("widgets/urbackup/proxy", () => {
|
||||
maxDays: 5,
|
||||
});
|
||||
|
||||
UrbackupServer.mockImplementationOnce((opts) => {
|
||||
UrbackupServer.mockImplementationOnce(function UrbackupServer(opts) {
|
||||
const instance = {
|
||||
opts,
|
||||
getStatus: vi.fn().mockResolvedValue([{ id: 1 }]),
|
||||
@@ -76,7 +76,7 @@ describe("widgets/urbackup/proxy", () => {
|
||||
fields: ["totalUsed"],
|
||||
});
|
||||
|
||||
UrbackupServer.mockImplementationOnce((opts) => {
|
||||
UrbackupServer.mockImplementationOnce(function UrbackupServer(opts) {
|
||||
const instance = {
|
||||
opts,
|
||||
getStatus: vi.fn().mockResolvedValue([{ id: 1 }]),
|
||||
@@ -99,7 +99,7 @@ describe("widgets/urbackup/proxy", () => {
|
||||
it("returns 500 on server errors", async () => {
|
||||
getServiceWidget.mockResolvedValue({ url: "http://ur", username: "u", password: "p" });
|
||||
|
||||
UrbackupServer.mockImplementationOnce((opts) => {
|
||||
UrbackupServer.mockImplementationOnce(function UrbackupServer(opts) {
|
||||
const instance = {
|
||||
opts,
|
||||
getStatus: vi.fn().mockRejectedValue(new Error("nope")),
|
||||
|
||||
Reference in New Issue
Block a user