Skip to main content
Deno 2 is finally here 🎉️
Learn more

deno-power-doctest

Deno port of power-doctest.

Examples

const n: number = 123;
console.log(n); // => 123
console.log(n + 1); // => 124
console.log("foo"); // => "foo"
console.log({ n: 1, s: "bar" }); // => { n: 1, s: "bar" }
import { test } from "https://deno.land/x/deno_power_doctest@0.5.0/mod.ts";

Deno.test({
  name: "test",
  fn: async (t) => {
    await test(t, "README.md");
  },
  permissions: {
    read: ["."],
    write: [".doctest.ts"],
  },
});

Prior works