DenoDDeno
Powered by
KotkoroidK
Denoβ€’17mo agoβ€’
3 replies
Kotkoroid

Deno runs the whole script instead of the method

I have following test:
import { expect } from "jsr:@std/expect";
import { validateInput } from "./webp.ts";

Deno.test("invalid input", () => {
  const fn = validateInput;
  const result = fn('/root', 55);
  expect(result).toThrow();
});
import { expect } from "jsr:@std/expect";
import { validateInput } from "./webp.ts";

Deno.test("invalid input", () => {
  const fn = validateInput;
  const result = fn('/root', 55);
  expect(result).toThrow();
});


When I run
deno test
deno test
it runs the whole
webp.ts
webp.ts
script instead of just the
validateInput()
validateInput()
method.
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

deny path of website instead of whole website
KayKKay / help
2y ago
πŸ¦• Deno adds to package.json instead of deno.jsonc.
RolloRRollo / help
6mo ago
Installing a deno script
captainbuckketsCcaptainbuckkets / help
3y ago