// Test inputs for array data validation export const arrayDataInputs = [ { name: 'array-data-valid-basic', lexicons: [ { lexicon: 1, id: 'test.array.data', defs: { main: { type: 'record', key: 'tid', record: { type: 'object', properties: { tags: { type: 'array', items: { type: 'string' }, minLength: 1, maxLength: 5, }, }, }, }, }, }, ], collection: 'test.array.data', record: { tags: ['hello', 'world'] }, }, { name: 'array-data-invalid-below-minLength', lexicons: [ { lexicon: 1, id: 'test.array.minlength', defs: { main: { type: 'record', key: 'tid', record: { type: 'object', properties: { tags: { type: 'array', items: { type: 'string' }, minLength: 3, }, }, }, }, }, }, ], collection: 'test.array.minlength', record: { tags: ['hello'] }, }, { name: 'array-data-invalid-above-maxLength', lexicons: [ { lexicon: 1, id: 'test.array.maxlength', defs: { main: { type: 'record', key: 'tid', record: { type: 'object', properties: { tags: { type: 'array', items: { type: 'string' }, maxLength: 2, }, }, }, }, }, }, ], collection: 'test.array.maxlength', record: { tags: ['a', 'b', 'c'] }, }, { name: 'array-data-invalid-item-type', lexicons: [ { lexicon: 1, id: 'test.array.itemtype', defs: { main: { type: 'record', key: 'tid', record: { type: 'object', properties: { tags: { type: 'array', items: { type: 'string' }, }, }, }, }, }, }, ], collection: 'test.array.itemtype', record: { tags: ['hello', 42] }, }, { name: 'array-data-invalid-empty-with-minLength', lexicons: [ { lexicon: 1, id: 'test.array.emptymin', defs: { main: { type: 'record', key: 'tid', record: { type: 'object', properties: { tags: { type: 'array', items: { type: 'string' }, minLength: 1, }, }, }, }, }, }, ], collection: 'test.array.emptymin', record: { tags: [] }, }, ];