feat: create trie programmatically in options

This commit is contained in:
Jason Etcovitch
2021-02-04 09:11:28 +08:00
committed by Jun Yang
parent 8734e2e6ce
commit befc33c4eb
28 changed files with 196 additions and 146 deletions
+4 -2
View File
@@ -19,7 +19,9 @@ describe('LiquidOptions#operators', function () {
})
it('should evaluate a custom operator', async function () {
const result = await engine.parseAndRender('{% if "foo" isFooBar "bar" %}True{% endif %}')
expect(result).to.equal('True')
const first = await engine.parseAndRender('{% if "foo" isFooBar "bar" %}True{% else %}False{% endif %}')
expect(first).to.equal('True')
const second = await engine.parseAndRender('{% if "foo" isFooBar "foo" %}True{% else %}False{% endif %}')
expect(second).to.equal('False')
})
})