refactor(web): migrate to Vitest and esm (#29974)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
This commit is contained in:
Stephen Zhou
2025-12-22 16:35:22 +08:00
committed by GitHub
parent 42f7ecda12
commit eabdc5f0eb
268 changed files with 5455 additions and 6307 deletions

View File

@ -132,11 +132,11 @@ describe('Zod Features', () => {
expect(stringArraySchema.parse(['a', 'b', 'c'])).toEqual(['a', 'b', 'c'])
})
it('should support promise', () => {
it('should support promise', async () => {
const promiseSchema = z.promise(z.string())
const validPromise = Promise.resolve('success')
expect(promiseSchema.parse(validPromise)).resolves.toBe('success')
await expect(promiseSchema.parse(validPromise)).resolves.toBe('success')
})
it('should support unions', () => {