diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index f6d37898c..42e80d9d4 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -2,7 +2,7 @@ name: Verify changes on: [push, pull_request] -jobs: +jobs: tests: runs-on: ubuntu-latest @@ -71,3 +71,14 @@ jobs: run: | npm ci npx mocha test/module-systems/browser-test.js + + deno-usage: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: denolib/setup-deno@v1 + with: + deno-version: 'v0.23.0' + - run: deno --version + - run: deno test --allow-net=deno.land test/module-systems/deno-test.ts diff --git a/test/module-systems/deno-test.ts b/test/module-systems/deno-test.ts new file mode 100644 index 000000000..9325ae0b4 --- /dev/null +++ b/test/module-systems/deno-test.ts @@ -0,0 +1,17 @@ +import { test } from "https://deno.land/std@v0.21.0/testing/mod.ts"; +import { assertEquals } from "https://deno.land/std@v0.21.0/testing/asserts.ts"; +import mustache from "../../mustache.mjs"; + +const view = { + title: "Joe", + calc: function() { + return 2 + 4; + } +}; + +test(function canUseMustache() { + assertEquals( + mustache.render("{{title}} spends {{calc}}", view), + "Joe spends 6" + ); +});