Skip to content

Describe should also compile and describe array's rules #312

Closed
@Marsup

Description

@Marsup

Considering the following code :

> var Joi = require('joi');
> var schema = Joi.array().includes(Joi.number());
> schema.describe().rules[0];
{ name: 'includes',
  arg:
   [ { isJoi: true,
       _type: 'number',
       _settings: null,
       _tests: [Object],
       _dependencies: [],
       _mutators: [],
       _valids: [Object],
       _invalids: [Object],
       _flags: [Object],
       _description: null,
       _notes: [],
       _tags: [],
       _inner: null } ] }

I think the rules should contain described objects as well, not raw Joi objects.

Metadata

Metadata

Assignees

Labels

bugBug or defect

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions