Skip to content

Commit

Permalink
fix: templated script has wrong test imports
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry committed Mar 9, 2024
1 parent 241574a commit 95f0629
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/template/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ export async function run(
ctx: ScriptContext,
req: Request,
): Promise<Response> {
await ctx.call("rate_limit", "throttle", {});
// TODO: Implement code for ${moduleName}/${scriptName}
throw new Error("Unimplemented");
}
Expand All @@ -85,8 +83,8 @@ export async function run(

if (createTest) {
// Write default config
const testTs = `import { TestContext, Runtime } from "../_gen/test.ts";
export { assertEquals } from "https://deno.land/std@0.208.0/assert/mod.ts";
const testTs = `import { TestContext, test } from "../_gen/test.ts";
import { assert, assertEquals } from "https://deno.land/std@0.208.0/assert/mod.ts";
test("e2e", async (ctx: TestContext) => {
const res = await ctx.call("${moduleName}", "${scriptName}", {
Expand Down

0 comments on commit 95f0629

Please sign in to comment.