()
| 285 | |
| 286 | it('should get correct ValidationException from composite failure', async () => { |
| 287 | function asyncCompositeRule() { |
| 288 | return value => |
| 289 | new Promise(resolve => { |
| 290 | v8n() |
| 291 | .schema({ |
| 292 | a: v8n().string(), |
| 293 | b: v8n().number(), |
| 294 | }) |
| 295 | .check(value); |
| 296 | resolve(true); |
| 297 | }); |
| 298 | } |
| 299 | |
| 300 | v8n.extend({ asyncCompositeRule }); |
| 301 |