aboutsummaryrefslogtreecommitdiff
path: root/js/test/cache.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/test/cache.js')
-rw-r--r--js/test/cache.js13
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({