Skip to content

Commit

Permalink
Fix wrong import
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed Jul 31, 2024
1 parent 596e220 commit 727c1b8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/plugins/next-mocks/alias/headers/cookies.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
// We need this import to be a singleton, and because it's used in multiple entrypoints
// both in ESM and CJS, importing it via the package name instead of having a local import
// is the only way to achieve it actually being a singleton
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore we must ignore types here as during compilation they are not generated yet
import { headers } from "@storybook/nextjs/headers.mock";
import { fn } from "@storybook/test";
import { RequestCookies } from "next/dist/compiled/@edge-runtime/cookies/index.js";
import { headers } from "./index.js";

class RequestCookiesMock extends RequestCookies {
get = fn(super.get.bind(this)).mockName("next/headers::cookies().get");
Expand Down

0 comments on commit 727c1b8

Please sign in to comment.