Jest encountered an unexpected token

UI Components for Vue
Post Reply
yuren
Posts: 1
Joined: 27 Jan 2021, 16:16

05 Mar 2021, 13:43

Thanks for the great Datatable plugin!
Everythings working well as expected. While I tried to write a test case I got this error

Code: Select all


    This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.

    Details:

    /Users/username/Sites/my-project/node_modules/primevue/datatable/DataTable.vue:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){<template>
                                                                                             ^

    SyntaxError: Unexpected token '<'

      at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1350:14)
      at Object.<anonymous> (node_modules/primevue/datatable/index.js:2:18)
How to fix it?

Thanks,

James.Beale
Posts: 2
Joined: 25 Jun 2021, 19:44

30 Jun 2021, 10:38

Hi!

Were you able to get jest tests running for PrimeVue?

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests