diff --git a/test/subcommands/push/action/push-functions_test.ts b/test/subcommands/push/action/push-functions_test.ts index e8be685..c6b69e9 100644 --- a/test/subcommands/push/action/push-functions_test.ts +++ b/test/subcommands/push/action/push-functions_test.ts @@ -14,6 +14,7 @@ import createProject from "@/subcommands/admin/projects/create/action.ts"; import action from "@/subcommands/push/action.ts"; import { digest } from "@/jcli/crypto.ts"; import { join } from "path"; +import { listFilesRec } from "@/jcli/file/files-man.ts"; describe("functions", () => { let api: APIClientTest; @@ -181,14 +182,23 @@ describe("functions", () => { await api.fs.mkdir(`${FUNCTION_FILE_PATH}/users`); await api.fs.mkdir(`${FUNCTION_FILE_PATH}/posts`); await writeFuncFile("index.ts", "index"); + console.log("-----write"); await writeFuncFile("users/mod.ts", "mod"); await writeFuncFile("posts/entry.ts", "entry"); await action(options); + console.log("inside beforeEach--------"); + for await (const e of listFilesRec("./", { fs: api.fs })) { + console.log(`Found: "${e}"`); + } await writeFuncFile("index.ts", "xedni"); await writeFuncFile("users/mod.ts", "dom"); await writeFuncFile("posts/entry.ts", "yrtne"); + console.log("inside beforeEach++++++++"); + for await (const e of listFilesRec("./", { fs: api.fs })) { + console.log(`Found: "${e}"`); + } await action(options); }); @@ -196,6 +206,11 @@ describe("functions", () => { it("pushes to jet", async () => { const func = api.jet.getFunctions(projectId)!.get(FUNCTION_NAME)!; + console.log("inside test"); + for await (const e of listFilesRec("./", { fs: api.fs })) { + console.log(`Found: "${e}"`); + } + assert(func.files.hasFile(`index.ts`)); assertEquals( await func.files.readTextFile(`index.ts`), @@ -254,6 +269,7 @@ describe("functions", () => { await action(options); + console.log("-----remove"); await api.fs.remove(`${FUNCTION_FILE_PATH}/users/mod.ts`); await action(options);