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
+5 -1
View File
@@ -6,13 +6,17 @@ import * as sinonChai from 'sinon-chai'
import * as sinon from 'sinon'
import { Context } from '../../../src/context/context'
import { Value } from '../../../src/template/value'
import { createTrie } from '../../../src/util/operator-trie'
import { defaultOperators } from '../../../src/types'
chai.use(sinonChai)
const expect = chai.expect
describe('Value', function () {
const liquid = {} as any
const liquid = {
options: { operatorsTrie: createTrie(defaultOperators) }
} as any
describe('#constructor()', function () {
const filterMap = new FilterMap(false, liquid)