From c5f5795bef35f48b44d105168e7bbe353c71ecc8 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Mon, 10 Sep 2018 23:18:11 -0400 Subject: js: add cache callback, template callback, and singleton run callback tests --- js/test/cache.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'js/test/cache.js') 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({ -- cgit v1.2.3