-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI test verifying Mustache works with Deno
To ensure the ES module and source exposed by this package is compatible with Deno going forward. Added benefit is we get some sanity checks of the source code for free due to Deno's built-in TypeScript compiler getting angry if it sees things that does not make sense, in terms of missing function arguments and so on.
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
); | ||
}); |