aboutsummaryrefslogtreecommitdiff
path: root/js/test/filters.js
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2018-09-09 19:43:43 -0400
committerPaul Duncan <pabs@pablotron.org>2018-09-09 19:43:43 -0400
commita22f6a55ae65ca3675f7c97a030560e91d5b4d1f (patch)
treef1c73f2aa3203a3c375190ae3fb8402594d18af5 /js/test/filters.js
parenta498f0b7f0e3b498519160e516d4e4d7c87575e6 (diff)
downloadluigi-template-a22f6a55ae65ca3675f7c97a030560e91d5b4d1f.tar.bz2
luigi-template-a22f6a55ae65ca3675f7c97a030560e91d5b4d1f.zip
js: update api, add luigi-compat.js and test/compat
Diffstat (limited to 'js/test/filters.js')
-rw-r--r--js/test/filters.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/js/test/filters.js b/js/test/filters.js
index c9ba21a..9bf1a1c 100644
--- a/js/test/filters.js
+++ b/js/test/filters.js
@@ -3,14 +3,14 @@
var assert = chai.assert;
it('filter', function() {
- var t = new LuigiTemplate('foo%{bar|h}'),
+ var t = new Luigi.Template('foo%{bar|h}'),
r = t.run({ bar: '<' });
assert.equal(r, 'foo&lt;');
});
it('filter chain', function() {
- var r = LuigiTemplate.run('foo%{bar|uc|lc}', {
+ var r = Luigi.run('foo%{bar|uc|lc}', {
bar: 'foo'
});
@@ -18,11 +18,11 @@
});
it('custom global filter', function() {
- LuigiTemplate.FILTERS.barify = function(s) {
+ Luigi.FILTERS.barify = function(s) {
return 'bar-' + s + '-bar';
};
- var r = LuigiTemplate.run('foo%{bar | barify}', {
+ var r = Luigi.run('foo%{bar | barify}', {
bar: 'foo'
});
@@ -30,7 +30,7 @@
});
it('custom template filter', function() {
- var r = LuigiTemplate.run('foo%{bar | barify}', {
+ var r = Luigi.run('foo%{bar | barify}', {
bar: 'foo'
}, {
barify: function(s) {
@@ -42,7 +42,7 @@
});
it('filter args', function() {
- var r = LuigiTemplate.run('foo%{bar | wrap bar}', {
+ var r = Luigi.run('foo%{bar | wrap bar}', {
bar: 'foo'
}, {
wrap: function(s, args) {