docs: align cookie setup with env-only auth
This commit is contained in:
@@ -11,9 +11,13 @@ mock.module("@marketplace-scrapers/core", () => ({
|
||||
describe("API routes", () => {
|
||||
beforeEach(() => {
|
||||
fetchFacebookItems.mockReset();
|
||||
fetchFacebookItems.mockImplementation(() => Promise.resolve([{ title: "item" }]));
|
||||
fetchFacebookItems.mockImplementation(() =>
|
||||
Promise.resolve([{ title: "item" }]),
|
||||
);
|
||||
fetchEbayItems.mockReset();
|
||||
fetchEbayItems.mockImplementation(() => Promise.resolve([{ title: "item" }]));
|
||||
fetchEbayItems.mockImplementation(() =>
|
||||
Promise.resolve([{ title: "item" }]),
|
||||
);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
@@ -37,7 +41,9 @@ describe("API routes", () => {
|
||||
const { ebayRoute } = await import("../src/routes/ebay");
|
||||
|
||||
await ebayRoute(
|
||||
new Request("http://localhost/api/ebay?q=laptop&cookies=s%3D1&buyItNowOnly=true"),
|
||||
new Request(
|
||||
"http://localhost/api/ebay?q=laptop&cookies=s%3D1&buyItNowOnly=true",
|
||||
),
|
||||
);
|
||||
|
||||
expect(fetchEbayItems).toHaveBeenCalledWith("laptop", 1, {
|
||||
|
||||
Reference in New Issue
Block a user