summaryrefslogtreecommitdiff
path: root/js/test/template.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/template.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/template.js')
-rw-r--r--js/test/template.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/test/template.js b/js/test/template.js
index 9a0018f..a364c61 100644
--- a/js/test/template.js
+++ b/js/test/template.js
@@ -3,20 +3,20 @@
var assert = chai.assert;
it('run', function() {
- var t = new LuigiTemplate('foo%{bar}'),
+ var t = new Luigi.Template('foo%{bar}'),
r = t.run({ bar: 'foo' });
assert.equal(r, 'foofoo');
});
it('run singleton', function() {
- var r = LuigiTemplate.run('foo%{bar}', { bar: 'foo' });
+ var r = Luigi.run('foo%{bar}', { bar: 'foo' });
assert.equal(r, 'foofoo');
});
it('run with multiple keys', function() {
- var r = LuigiTemplate.run('foo%{bar}%{baz}', {
+ var r = Luigi.run('foo%{bar}%{baz}', {
bar: 'foo',
baz: 'foo',
});
@@ -26,7 +26,7 @@
it('run with whitespace around key', function() {
var s = "%{ \t\v\r\nbar}%{ \t\v\r\nbar \t\v\r\n}%{bar \t\v\r\n}",
- r = LuigiTemplate.run(s, { bar: 'foo' });
+ r = Luigi.run(s, { bar: 'foo' });
assert.equal(r, 'foofoofoo');
});