(fields: Record<string, unknown>)
| 525 | // |
| 526 | // { email: 'rob@redwood.com', name: 'Rob' } => 'email, name' |
| 527 | const fieldsToString = (fields: Record<string, unknown>) => { |
| 528 | const output = [] |
| 529 | for (const [key, _value] of Object.entries(fields)) { |
| 530 | output.push(key) |
| 531 | } |
| 532 | return output.join(', ') |
| 533 | } |
| 534 | |
| 535 | // Throws the requisite error message for a failed validation |
| 536 | const validationError = ( |
no test coverage detected