From c0f4d9a505ab1a94e6b0993582c9827f5a681e05 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 9 Sep 2018 11:02:08 -0400 Subject: js: add to Usage, fix cache test, add support for cache custom filters --- js/test/cache.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'js/test') 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', }); -- cgit v1.2.3