diff options
author | Paul Duncan <pabs@pablotron.org> | 2018-09-09 11:02:08 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2018-09-09 11:02:08 -0400 |
commit | c0f4d9a505ab1a94e6b0993582c9827f5a681e05 (patch) | |
tree | 250ed30d37b8a775153acfd5514dd76229a1f1fb /js/test | |
parent | b4e1f4906a27619b3edffd791361694f00f38662 (diff) | |
download | luigi-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.js | 7 |
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', }); |