chore: migrate test cases from Chai to Jest

This commit is contained in:
Harttle
2023-03-20 00:41:06 +08:00
committed by Jun Yang
parent dccb90c591
commit c6cde9cd10
97 changed files with 8163 additions and 26440 deletions
+14
View File
@@ -0,0 +1,14 @@
import { normalize } from '../../../src/liquid-options'
describe('LiquidOptions#root', function () {
describe('#normalize ()', function () {
it('should normalize string typed root array', function () {
const options = normalize({ root: 'foo' })
expect(options.root).toEqual(['foo'])
})
it('should normalize null typed root as empty array', function () {
const options = normalize({ root: null } as any)
expect(options.root).toEqual([])
})
})
})