getDefaultAnswer = async (question, answersContext) => {
  if (question.when && !question.when(answersContext)) return undefined

  switch (question.type) {
    case 'input':
      return typeof question.default === 'function'
        ? question.default(answersContext)
        : question.default || ''
    case 'checkbox':
      return question.choices
        .filter(choice => choice.checked)
        .map(choice => choice.value)
    default:
      return undefined
  }
}
Get the default answer depending on the question type

@param {Object} question