MCPcopy
hub / github.com/imbrn/v8n / asyncCompositeRule

Function asyncCompositeRule

src/v8n.test.js:287–298  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

v8nFunction · 0.85
schemaMethod · 0.80
stringMethod · 0.80
numberMethod · 0.80
checkMethod · 0.65

Tested by

no test coverage detected