Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
fahchen committed Jan 9, 2025
1 parent 6d52ca4 commit 9e26434
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/subcommands/push/action/push-functions_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -181,6 +182,7 @@ 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");

Expand All @@ -202,6 +204,9 @@ describe("functions", () => {
"xedni",
);

for await (const e of listFilesRec("./src", { fs: api.fs })) {
console.log(`Found: "${e}"`);
}
assert(func.files.hasFile(`users/mod.ts`));
assertEquals(
await func.files.readTextFile(`users/mod.ts`),
Expand Down Expand Up @@ -254,6 +259,7 @@ describe("functions", () => {

await action(options);

console.log("-----remove");
await api.fs.remove(`${FUNCTION_FILE_PATH}/users/mod.ts`);

await action(options);
Expand Down

0 comments on commit 9e26434

Please sign in to comment.