Skip to content

Tagged template strings are not supported #98

@mjss

Description

@mjss

If tagged template strings are used, test suit will fail with following error:

Tagged template strings are not supported. Use `transforms: { templateString: false }` to skip transformation and disable this error, or `transforms: { dangerousTaggedTemplateString: true }` if you know what you're doing (1:303)

      at Node.initialise (node_modules/vue-template-es2015-compiler/buble.js:12998:10)
          at Array.forEach (<anonymous>)
          at Array.forEach (<anonymous>)

Apparently, this error message is from buble.js.
It seems that vue-jest uses vue-template-es2015-compiler, and vue-template-es2015-compiler uses buble.
But neither vue-jest nor vue-template-es2015-compiler explains whether it is necessary and how to configure buble.

Is it possible to resolve this in vue-jest?
Any fixes or explanations are appreciated. Thank you.

I created a sample project to illustrate the issue. Steps to reproduce:

  1. clone https://github.com/mjss/vue-jest-with-tagged-template
  2. run npm test:unit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions