No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Jest encountered an unexpected token: <template>

    Help
    1
    3
    29
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • CWoodman
      CWoodman last edited by

      After upgrading to Quasar 1.14.5 suddenly all my component unit tests are failing. Is there an easy fix?

      1 Reply Last reply Reply Quote 0
      • CWoodman
        CWoodman last edited by

        Went back to before the Quasar upgrade, but still see the problem.
        Then re-installed jest like this, but still have the same problem…
        $ quasar ext remove @quasar/testing-unit-jest
        $ quasar ext add @quasar/testing-unit-jest

        Why is jest not recognizing <template> ??

        1 Reply Last reply Reply Quote 0
        • CWoodman
          CWoodman last edited by

          Well this is just weird!
          Vetur was showing every line with error in two of my components. After trying many things, I accidentally discovered that changing the filename fixed the problem!
          So TreeSelect.vue was full of errors starting with the <template> tag, but renaming to SelectTree.vue made them all go away!
          And now, my jest tests are working again too!
          I’ll leave this post up in case someone else falls into this weird situation.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post