Files
Matthieu Sieben 9af7a2d122 Password based agent implementation (#4443)
* Password based agent implementation

* tidy

* tidy

* wip

* tidy

* wip

* tidy

* wip

* tests

* tidy

* websocket

* tidy

* tidy

* tidy

* tidy

* tidy

* tidy

* tidy

* tidy

* changeset

* codegen

* tidy

* tidy

* tidy

* tidy

* tests

* tidy

* tidy

* tests

* tidy

* tidy

* tidy

* wip

* tidy

* memoize

* tidy

* tests

* tidy

* files reorg

* Ensure that default values match constraints

* wip

* use vitest to test lex

* Add readme

* fix lint

* add vitest workspace config

* vitest config

* vitest-cfg

* tests

* ignore coverage

* tidy
2026-01-01 13:28:29 +01:00

25 lines
729 B
TypeScript

import { describe, expect, it } from 'vitest'
import { lexiconDocumentSchema } from '../src/index.js'
import invalidLexicons from './lexicon-invalid.json' with { type: 'json' }
import validLexicons from './lexicon-valid.json' with { type: 'json' }
describe('fixtures', () => {
describe('valid lexicons', () => {
for (const { name, lexicon } of validLexicons) {
it(name, () => {
expect(lexiconDocumentSchema.parse(lexicon)).toBe(lexicon)
})
}
})
describe('invalid lexicons', () => {
for (const { name, lexicon } of invalidLexicons) {
it(name, () => {
expect(lexiconDocumentSchema.safeParse(lexicon)).toMatchObject({
success: false,
})
})
}
})
})