Question · Vue.js course · Module 9: Composables & VueUse

withSetup Helper in Tests

Why do we need the withSetup helper for testing composables?

Answer options

  • A composable with lifecycle hooks or inject requires a Vue component context
  • It is required by Vitest
  • It automatically generates tests
  • It replaces @vue/test-utils

You can check the correct answer by solving this task in the CodeWorlds game.