diff options
author | Paul Duncan <pabs@pablotron.org> | 2018-09-10 23:18:11 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2018-09-10 23:18:11 -0400 |
commit | c5f5795bef35f48b44d105168e7bbe353c71ecc8 (patch) | |
tree | 45046c7aa9d8f434b1a605369e277f2a204379ca /js/test/cache.js | |
parent | 07ad63c1b2d3cc8128b238b19be192ffb6d1a44a (diff) | |
download | luigi-template-c5f5795bef35f48b44d105168e7bbe353c71ecc8.tar.bz2 luigi-template-c5f5795bef35f48b44d105168e7bbe353c71ecc8.zip |
js: add cache callback, template callback, and singleton run callback tests
Diffstat (limited to 'js/test/cache.js')
-rw-r--r-- | js/test/cache.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/test/cache.js b/js/test/cache.js index 9395223..710488a 100644 --- a/js/test/cache.js +++ b/js/test/cache.js @@ -38,6 +38,19 @@ assert.equal(r, 'foofoo'); }); + it('cache run with callback', function() { + var r = []; + + Luigi.cache({ + foo: 'foo%{bar}', + }).run('foo', { + bar: 'foo', + }, function(s) { + r.push(s); + }); + + assert.equal(r.join(''), 'foofoo'); + }); it('cache with custom filters', function() { var cache = Luigi.cache({ |