vuejs / vue-jest

Jest Vue transformer
MIT License
746 stars 157 forks source link

feat: allow to pass compilerOptions via the Jest config for Vue 3 #412

Closed cexbrayat closed 2 years ago

cexbrayat commented 2 years ago

These options can be used to define Vue compiler options in @vue/vue3-jest.

For example, to enable the newly introduced propsDestructureTransform in Vue v3.2.20:

globals: {
  'vue-jest': {
    compilerOptions: {
      propsDestructureTransform: true
    }
  }
}

or to disable refTransform (which is enabled by default):

globals: {
  'vue-jest': {
    compilerOptions: {
      refTransform: false
    }
  }
}