chore(TypeScript): fix linting and generate .d.ts

This commit is contained in:
harttle
2019-02-17 18:20:04 +08:00
parent 7ee87008c7
commit fc9ebdb90f
79 changed files with 809 additions and 820 deletions
+2 -2
View File
@@ -7,13 +7,13 @@ const expect = chai.expect
describe('Liquid', function () {
describe('#constructor()', function () {
it('should throw on illegal root', function () {
expect(() => new (Liquid as any)({root: {}})).to.throw(/illegal root/)
expect(() => new (Liquid as any)({ root: {} })).to.throw(/illegal root/)
})
})
describe('#plugin()', function () {
it('should call plugin on the instance', async function () {
const engine = new Liquid()
engine.plugin(function (Liquid) {
engine.plugin(function () {
this.registerFilter('foo', x => `foo${x}foo`)
})
const html = await engine.parseAndRender('{{"bar"|foo}}')