refactor: Tag class support in registerTag()

This commit is contained in:
Jun Yang
2022-11-27 14:04:01 +08:00
parent 1f6ce7c822
commit 92992689cd
145 changed files with 694 additions and 768 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import { Liquid, Drop } from '../..'
import { Liquid } from '../../src/liquid'
import { Drop } from '../../src/drop/drop'
import { expect, use } from 'chai'
import * as chaiAsPromised from 'chai-as-promised'
+2 -2
View File
@@ -1,4 +1,4 @@
import { Tokenizer, Context, Liquid, Drop, defaultOptions, toValueSync } from '../..'
import { Tokenizer, Context, Liquid, Drop, toValueSync } from '../..'
import { expect, use } from 'chai'
import * as chaiAsPromised from 'chai-as-promised'
import * as sinon from 'sinon'
@@ -261,7 +261,7 @@ describe('Issues', function () {
expect(() => engine.parse('{% assign headshot = https://testurl.com/not_enclosed_in_quotes.jpg %}')).to.throw(/unexpected token at ":/)
})
it('#527 export Liquid Expression', () => {
const tokenizer = new Tokenizer('a > b', defaultOptions.operatorsTrie)
const tokenizer = new Tokenizer('a > b')
const expression = tokenizer.readExpression()
const result = toValueSync(expression.evaluate(new Context({ a: 1, b: 2 })))
expect(result).to.equal(false)