mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
test: fix mock zip drop
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import fs from "node:fs/promises";
|
import fs from "node:fs/promises";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { paths } from "@dokploy/server";
|
import { paths } from "@dokploy/server/dist/constants";
|
||||||
const { APPLICATIONS_PATH } = paths();
|
const { APPLICATIONS_PATH } = paths();
|
||||||
import type { ApplicationNested } from "@dokploy/server";
|
import type { ApplicationNested } from "@dokploy/server";
|
||||||
import { unzipDrop } from "@dokploy/server";
|
import { unzipDrop } from "@dokploy/server";
|
||||||
@@ -82,11 +82,11 @@ const baseApp: ApplicationNested = {
|
|||||||
dockerContextPath: null,
|
dockerContextPath: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
vi.mock("@dokploy/server", async (importOriginal) => {
|
vi.mock("@dokploy/server/dist/constants", async (importOriginal) => {
|
||||||
const actual = await importOriginal();
|
const actual = await importOriginal();
|
||||||
return {
|
return {
|
||||||
|
// @ts-ignore
|
||||||
...actual,
|
...actual,
|
||||||
unzipDrop: actual.unzipDrop, // Asegura que unzipDrop esté presente en el mock
|
|
||||||
paths: () => ({
|
paths: () => ({
|
||||||
APPLICATIONS_PATH: "./__test__/drop/zips/output",
|
APPLICATIONS_PATH: "./__test__/drop/zips/output",
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user