mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-18 05:50:43 -07:00
refactor: Tag class support in registerTag()
This commit is contained in:
@@ -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