import { isInputEditable } from '../is_input_editable' const base = { isPending: false, conversationDisabled: false, } describe('isInputEditable', () => { it.each([ ['active conversation with no text', base, true], ['active conversation with text', base, true], ['pending request locks input', { ...base, isPending: true }, false], ['disabled conversation locks input', { ...base, conversationDisabled: true }, false], ])('%s', (_label, args, expected) => { expect(isInputEditable(args)).toBe(expected) }) })