chore(TypeScript): ship Liquid to class

BREAKING CHANGE: calling `Liquid()` without `new` now becomes invalid
This commit is contained in:
harttle
2019-02-14 23:53:40 +08:00
parent a626de632c
commit 1cc7249a71
27 changed files with 124 additions and 126 deletions
+4 -4
View File
@@ -6,8 +6,8 @@ import * as path from 'path'
const expect = chai.expect
chai.use(require('chai-as-promised'))
let engine = Liquid()
const strictEngine = Liquid({
let engine = new Liquid()
const strictEngine = new Liquid({
strict_variables: true,
strict_filters: true
})
@@ -76,7 +76,7 @@ describe('error', function () {
describe('RenderError', function () {
beforeEach(function () {
engine = Liquid({
engine = new Liquid({
root: '/'
})
engine.registerTag('throwingTag', {
@@ -217,7 +217,7 @@ describe('error', function () {
describe('ParseError', function () {
beforeEach(function () {
engine = Liquid()
engine = new Liquid()
engine.registerTag('throwsOnParse', {
parse: function () {
throw new Error('intended parse error')