test: coverage to 100%

This commit is contained in:
Harttle
2021-10-01 15:55:31 +08:00
committed by harttle
parent 9a96b4aba3
commit 4358c9630f
11 changed files with 115 additions and 65 deletions
+15
View File
@@ -0,0 +1,15 @@
import { normalize } from '../../src/liquid-options'
import { expect } from 'chai'
describe('liquid-options', () => {
describe('.normalize()', () => {
it('should return plain object for empty input', () => {
const options = normalize()
expect(JSON.stringify(options)).to.equal('{}')
})
it('should set falsy cache to undefined', () => {
const options = normalize({ cache: false })
expect(JSON.stringify(options)).to.equal('{}')
})
})
})