mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 12:50:38 -07:00
chore(TypeScript): refactor objects into classes
fix: `Nil`(null, undefined) now renders as empty string change: `parser.parseValue()` renamed to `parser.parseOutput` change: registered tags/filters become static and shared across different liquid instances
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import * as chai from 'chai'
|
||||
import assert from '../../../src/util/assert'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
describe('assert', function () {
|
||||
it('should not throw if predicate is truthy', function () {
|
||||
const fn = () => assert('foo', 'bar')
|
||||
expect(fn).to.not.throw()
|
||||
})
|
||||
it('should not throw if predicate is truthy', function () {
|
||||
const fn = () => assert('', 'bar')
|
||||
expect(fn).to.throw(/bar/)
|
||||
})
|
||||
it('should populate default message', function () {
|
||||
const fn = () => assert(false)
|
||||
expect(fn).to.throw(/expect false to be true/)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user