// Test inputs for string data validation export const stringDataInputs = [ { name: 'string-data-valid-basic', lexicons: [ { lexicon: 1, id: 'test.string.data', defs: { main: { type: 'record', key: 'tid', record: { type: 'object', properties: { text: { type: 'string', minLength: 1, maxLength: 10, }, }, }, }, }, }, ], collection: 'test.string.data', record: { text: 'hello' }, }, { name: 'string-data-invalid-too-short', lexicons: [ { lexicon: 1, id: 'test.string.short', defs: { main: { type: 'record', key: 'tid', record: { type: 'object', properties: { text: { type: 'string', minLength: 10, }, }, }, }, }, }, ], collection: 'test.string.short', record: { text: 'short' }, }, { name: 'string-data-invalid-too-long', lexicons: [ { lexicon: 1, id: 'test.string.long', defs: { main: { type: 'record', key: 'tid', record: { type: 'object', properties: { text: { type: 'string', maxLength: 5, }, }, }, }, }, }, ], collection: 'test.string.long', record: { text: 'this is too long' }, }, { name: 'string-data-valid-enum', lexicons: [ { lexicon: 1, id: 'test.string.enumvalid', defs: { main: { type: 'record', key: 'tid', record: { type: 'object', properties: { color: { type: 'string', enum: ['red', 'blue'], }, }, }, }, }, }, ], collection: 'test.string.enumvalid', record: { color: 'red' }, }, { name: 'string-data-invalid-enum', lexicons: [ { lexicon: 1, id: 'test.string.enuminvalid', defs: { main: { type: 'record', key: 'tid', record: { type: 'object', properties: { color: { type: 'string', enum: ['red', 'blue'], }, }, }, }, }, }, ], collection: 'test.string.enuminvalid', record: { color: 'green' }, }, { name: 'string-data-invalid-wrong-type', lexicons: [ { lexicon: 1, id: 'test.string.wrongtype', defs: { main: { type: 'record', key: 'tid', record: { type: 'object', properties: { text: { type: 'string', }, }, }, }, }, }, ], collection: 'test.string.wrongtype', record: { text: 42 }, }, { name: 'string-data-invalid-graphemes-too-short', lexicons: [ { lexicon: 1, id: 'test.string.graphshort', defs: { main: { type: 'record', key: 'tid', record: { type: 'object', properties: { text: { type: 'string', minGraphemes: 10, }, }, }, }, }, }, ], collection: 'test.string.graphshort', record: { text: 'hi' }, }, { name: 'string-data-invalid-graphemes-too-long', lexicons: [ { lexicon: 1, id: 'test.string.graphlong', defs: { main: { type: 'record', key: 'tid', record: { type: 'object', properties: { text: { type: 'string', maxGraphemes: 3, }, }, }, }, }, }, ], collection: 'test.string.graphlong', record: { text: 'hello' }, }, ];