mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-18 14:00:39 -07:00
refactor: Tag class support in registerTag()
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { expect } from 'chai'
|
||||
import { matchOperator } from '../../../src/parser/match-operator'
|
||||
import { defaultOperators } from '../../../src/types'
|
||||
import { defaultOperators } from '../../../src'
|
||||
import { createTrie } from '../../../src/util/operator-trie'
|
||||
|
||||
describe('parser/matchOperator()', function () {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import * as chai from 'chai'
|
||||
import { ParseStream } from '../../../src/parser'
|
||||
import { Token } from '../../../src/tokens'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
describe('parseStream', () => {
|
||||
it('should trigger "token" event', () => {
|
||||
const token = { kind: 4 } as Token
|
||||
const ps = new ParseStream([token], (token) => ({ token } as any))
|
||||
let got
|
||||
ps.on('token', token => { got = token }).start()
|
||||
expect(got).to.equal(token)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user