From 4221728e6ff66ddb25865e927cc490f63004ce73 Mon Sep 17 00:00:00 2001 From: Justin Staubach Date: Sat, 7 Sep 2019 12:51:24 -0400 Subject: [PATCH] Test view with functions from cli Tests #717 for cli which allows use of functions in a view which is exported javascript. --- test/_files/cli_js_view_with_function.js | 8 ++++++++ test/_files/cli_js_view_with_function.mustache | 1 + test/_files/cli_js_view_with_function.txt | 1 + 3 files changed, 10 insertions(+) create mode 100644 test/_files/cli_js_view_with_function.js create mode 100644 test/_files/cli_js_view_with_function.mustache create mode 100644 test/_files/cli_js_view_with_function.txt diff --git a/test/_files/cli_js_view_with_function.js b/test/_files/cli_js_view_with_function.js new file mode 100644 index 0000000..29d1a27 --- /dev/null +++ b/test/_files/cli_js_view_with_function.js @@ -0,0 +1,8 @@ +module.exports = { + 'name': 'Tater', + 'bold': function () { + return function (text, render) { + return '' + render(text) + ''; + }; + } +}; \ No newline at end of file diff --git a/test/_files/cli_js_view_with_function.mustache b/test/_files/cli_js_view_with_function.mustache new file mode 100644 index 0000000..a73ebbe --- /dev/null +++ b/test/_files/cli_js_view_with_function.mustache @@ -0,0 +1 @@ +{{#bold}}Hi {{name}}.{{/bold}} \ No newline at end of file diff --git a/test/_files/cli_js_view_with_function.txt b/test/_files/cli_js_view_with_function.txt new file mode 100644 index 0000000..3f6eb97 --- /dev/null +++ b/test/_files/cli_js_view_with_function.txt @@ -0,0 +1 @@ +Hi Tater. \ No newline at end of file