Add basic tests

This commit is contained in:
Adria Navarro 2025-02-17 10:36:43 +01:00
parent e266c1b8cf
commit 6e57be6380
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
import { validateHbsTemplate } from "../hbs"
describe("hbs validator", () => {
it("can validate empty strings", () => {
const text = ""
const validators = {}
const result = validateHbsTemplate(text, validators)
expect(result).toHaveLength(0)
})
it("can validate strings without hbs expressions", () => {
const text = "first line\nand another one"
const validators = {}
const result = validateHbsTemplate(text, validators)
expect(result).toHaveLength(0)
})
})