feat: parse quest using zod, basic

This commit is contained in:
Justin Lin committed 2025-04-16 17:37:42 +08:00
1 parent 963655c1f7
commit ed4d04b658
22 files changed
+390 -95

No files matched your search

@@ -0,0 +1,13 @@
import { describe, it, expect } from '@jest/globals'
import { conditionSchema } from '../src/index.js'
describe('parsing condition', () => {
it('should parse condition', () => {
const condition = {
command: ['^echo start$'],
output: ['^start$'],
}
const result = conditionSchema.safeParse(condition)
expect(result.error).toBeUndefined()
})
})