aboutsummaryrefslogtreecommitdiff
path: root/js/test
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2018-09-09 11:02:08 -0400
committerPaul Duncan <pabs@pablotron.org>2018-09-09 11:02:08 -0400
commitc0f4d9a505ab1a94e6b0993582c9827f5a681e05 (patch)
tree250ed30d37b8a775153acfd5514dd76229a1f1fb /js/test
parentb4e1f4906a27619b3edffd791361694f00f38662 (diff)
downloadluigi-template-c0f4d9a505ab1a94e6b0993582c9827f5a681e05.tar.bz2
luigi-template-c0f4d9a505ab1a94e6b0993582c9827f5a681e05.zip
js: add to Usage, fix cache test, add support for cache custom filters
Diffstat (limited to 'js/test')
-rw-r--r--js/test/cache.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/test/cache.js b/js/test/cache.js
index 0b68b3d..22490c1 100644
--- a/js/test/cache.js
+++ b/js/test/cache.js
@@ -40,14 +40,15 @@
it('cache with custom filters', function() {
- var cache = new LuigiTemplate.Cache({
- foo: ['foo%{bar | barify}'],
+ var cache = LuigiTemplate.cache({
+ foo: ['foo%{bar | cache-barify}'],
}, {
- barify: function(s) {
+ 'cache-barify': function(s) {
return 'bar-' + s + '-bar';
},
});
+ // run template from cache, get result
var r = cache.run('foo', {
bar: 'foo',
});