mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
feat(Input/Textarea): allow null value in model (#3415)
This commit is contained in:
committed by
GitHub
parent
ed7710a890
commit
cfe9b2ecf3
@@ -52,7 +52,8 @@ describe('Input', () => {
|
||||
it.each([
|
||||
['with .trim modifier', { props: { modelModifiers: { trim: true } } }, { input: 'input ', expected: 'input' }],
|
||||
['with .number modifier', { props: { modelModifiers: { number: true } } }, { input: '42', expected: 42 }],
|
||||
['with .lazy modifier', { props: { modelModifiers: { lazy: true } } }, { input: 'input', expected: 'input' }]
|
||||
['with .lazy modifier', { props: { modelModifiers: { lazy: true } } }, { input: 'input', expected: 'input' }],
|
||||
['with .nullify modifier', { props: { modelModifiers: { nullify: true } } }, { input: '', expected: null }]
|
||||
])('%s works', async (_nameOrHtml: string, options: { props?: any, slots?: any }, spec: { input: any, expected: any }) => {
|
||||
const wrapper = mount(Input, {
|
||||
...options
|
||||
|
||||
@@ -35,7 +35,8 @@ describe('Textarea', () => {
|
||||
it.each([
|
||||
['with .trim modifier', { props: { modelModifiers: { trim: true } } }, { input: 'input ', expected: 'input' }],
|
||||
['with .number modifier', { props: { modelModifiers: { number: true } } }, { input: '42', expected: 42 }],
|
||||
['with .lazy modifier', { props: { modelModifiers: { lazy: true } } }, { input: 'input', expected: 'input' }]
|
||||
['with .lazy modifier', { props: { modelModifiers: { lazy: true } } }, { input: 'input', expected: 'input' }],
|
||||
['with .nullify modifier', { props: { modelModifiers: { nullify: true } } }, { input: '', expected: null }]
|
||||
])('%s works', async (_nameOrHtml: string, options: { props?: any, slots?: any }, spec: { input: any, expected: any }) => {
|
||||
const wrapper = mount(Textarea, {
|
||||
...options
|
||||
|
||||
Reference in New Issue
Block a user