mirror of
https://github.com/gethomepage/homepage.git
synced 2026-02-08 00:40:52 +08:00
chore: make lint pass for vitest tests
This commit is contained in:
@@ -53,12 +53,7 @@ describe("widgets/linkwarden/component", () => {
|
||||
useWidgetAPI.mockImplementation((_widget, endpoint) => {
|
||||
if (endpoint === "collections") {
|
||||
return {
|
||||
data: [
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
{ _count: { links: 2 } },
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
{ _count: { links: 3 } },
|
||||
],
|
||||
data: [{ _count: { links: 2 } }, { _count: { links: 3 } }],
|
||||
error: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import { describe, expect, it, vi } from "vitest";
|
||||
vi.mock("next/image", () => ({
|
||||
default: (props) => {
|
||||
const { src, alt, objectFit, className, onError } = props;
|
||||
// This is a unit-test stub for next/image; using <img> is intentional here.
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
return <img alt={alt} src={src} data-object-fit={objectFit} className={className} onError={onError} />;
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user