UNPKG

input-plugin-text

Version:
31 lines (25 loc) 415 B
import test from 'ava'; import validation from '../lib/validation'; const input = { target: { name: 'text', value: 'foo bar baz', }, all: { text: 'foo bar baz', }, }; const settings = { target: { empty: false, }, all: { text: { empty: false, }, }, }; // Valid input test('valid input', t => { t.true(validation(input, settings), 'Valid input returns true'); });