deno-test.ts 340 B

12345678910111213141516
  1. import { assertEquals } from "https://deno.land/std@0.51.0/testing/asserts.ts";
  2. import mustache from "../../mustache.mjs";
  3. const view = {
  4. title: "Joe",
  5. calc: function() {
  6. return 2 + 4;
  7. }
  8. };
  9. Deno.test("can use mustache", () => {
  10. assertEquals(
  11. mustache.render("{{title}} spends {{calc}}", view),
  12. "Joe spends 6"
  13. );
  14. });