From 3b82a7fada671228654a6f8dfeb60b8322e54d74 Mon Sep 17 00:00:00 2001 From: Kyle June Date: Wed, 31 Jul 2024 23:07:37 -0400 Subject: [PATCH] Add test files and update launch commands (#95) --- .vscode/launch.json | 15 +++++++++------ build.test.ts | 1 + client.test.tsx | 1 + deno.lock | 8 +++++++- dev.test.ts | 1 + error.test.tsx | 1 + mod.test.tsx | 1 + server.test.ts | 1 + 8 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 build.test.ts create mode 100644 client.test.tsx create mode 100644 dev.test.ts create mode 100644 error.test.tsx create mode 100644 mod.test.tsx create mode 100644 server.test.ts diff --git a/.vscode/launch.json b/.vscode/launch.json index f460a07..e80a168 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "request": "launch", - "name": "deno task: build", + "name": "build", "type": "node", "program": "${workspaceFolder}/build.ts", "cwd": "${workspaceFolder}/example", @@ -14,13 +14,14 @@ "--inspect-wait" ], "env": { - "APP_ENV": "production" + "APP_ENV": "development", + "NODE_ENV": "development" }, "attachSimplePort": 9229 }, { "request": "launch", - "name": "deno task: run", + "name": "run", "type": "node", "program": "${workspaceFolder}/example/main.ts", "cwd": "${workspaceFolder}/example", @@ -31,13 +32,14 @@ "--inspect-wait" ], "env": { - "APP_ENV": "production" + "APP_ENV": "development", + "NODE_ENV": "development" }, "attachSimplePort": 9229 }, { "request": "launch", - "name": "deno task: test", + "name": "test", "type": "node", "program": ".", "cwd": "${workspaceFolder}", @@ -48,7 +50,8 @@ "--inspect-wait" ], "env": { - "APP_ENV": "test" + "APP_ENV": "test", + "NODE_ENV": "development" }, "attachSimplePort": 9229 } diff --git a/build.test.ts b/build.test.ts new file mode 100644 index 0000000..78da282 --- /dev/null +++ b/build.test.ts @@ -0,0 +1 @@ +import "./build.ts"; diff --git a/client.test.tsx b/client.test.tsx new file mode 100644 index 0000000..c871458 --- /dev/null +++ b/client.test.tsx @@ -0,0 +1 @@ +import "./client.tsx"; diff --git a/deno.lock b/deno.lock index 8b5b722..438fcd8 100644 --- a/deno.lock +++ b/deno.lock @@ -29,6 +29,7 @@ "jsr:@std/internal@^1.0.1": "jsr:@std/internal@1.0.1", "jsr:@std/io@0.223": "jsr:@std/io@0.223.0", "jsr:@std/io@^0.224.3": "jsr:@std/io@0.224.3", + "jsr:@std/json@^0.213.1": "jsr:@std/json@0.213.1", "jsr:@std/jsonc@0.213": "jsr:@std/jsonc@0.213.1", "jsr:@std/log@0": "jsr:@std/log@0.224.5", "jsr:@std/media-types@0.223": "jsr:@std/media-types@0.223.0", @@ -171,10 +172,14 @@ "@std/io@0.224.3": { "integrity": "b402edeb99c6b3778d9ae3e9927bc9085b170b41e5a09bbb7064ab2ee394ae2f" }, + "@std/json@0.213.1": { + "integrity": "f572b1de605d07c4a5602445dac54bfc51b1fb87a3710a17aed2608bfca54e68" + }, "@std/jsonc@0.213.1": { "integrity": "5578f21aa583b7eb7317eed077ffcde47b294f1056bdbb9aacec407758637bfe", "dependencies": [ - "jsr:@std/assert@^0.213.1" + "jsr:@std/assert@^0.213.1", + "jsr:@std/json@^0.213.1" ] }, "@std/log@0.224.5": { @@ -887,6 +892,7 @@ "jsr:@std/path@1", "jsr:@std/testing@0", "jsr:@udibo/http-error@0", + "npm:@tanstack/query@5", "npm:@testing-library/react@16", "npm:@types/react@18", "npm:esbuild@0.20", diff --git a/dev.test.ts b/dev.test.ts new file mode 100644 index 0000000..dedb925 --- /dev/null +++ b/dev.test.ts @@ -0,0 +1 @@ +import "./dev.ts"; diff --git a/error.test.tsx b/error.test.tsx new file mode 100644 index 0000000..77b416e --- /dev/null +++ b/error.test.tsx @@ -0,0 +1 @@ +import "./error.tsx"; diff --git a/mod.test.tsx b/mod.test.tsx new file mode 100644 index 0000000..c413605 --- /dev/null +++ b/mod.test.tsx @@ -0,0 +1 @@ +import "./mod.tsx"; diff --git a/server.test.ts b/server.test.ts new file mode 100644 index 0000000..685848b --- /dev/null +++ b/server.test.ts @@ -0,0 +1 @@ +import "./server.tsx";