ManukMinasyan / vue-functional-calendar

Vue.js Functional Calendar | Component/Package
https://vue-functional-calendar.now.sh/
MIT License
469 stars 84 forks source link

SyntaxError: Unexpected identifier #29

Closed jaywilburn closed 5 years ago

jaywilburn commented 5 years ago

While running tests in Jest, I received this:

DateRange.vue.js.test `Test suite failed to run

/Users/jaywilburn/Code/HLT/hlt-cms/node_modules/vue-functional-calendar/index.js:2
import FunctionalCalendar from './src/components/FunctionalCalendar';
       ^^^^^^^^^^^^^^^^^^

SyntaxError: Unexpected identifier

  13 | 
  14 | <script>
> 15 | import { FunctionalCalendar } from 'vue-functional-calendar'
     | ^
  16 | export default {
  17 |   props: ['selectedSearchKey'],
  18 |   components: { FunctionalCalendar },

  at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:471:17)
  at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:513:25)`

It's not able to read the import from the right path Any ideas?

jaywilburn commented 5 years ago

Fixed.

Titoine commented 4 years ago

Could you share your fix? Is that anything to do with transformIgnorePatterns ? Because I'm struggling to make it works.

drewbaker commented 4 years ago

Just installed this into a Nuxt project and get this same error.

ManukMinasyan commented 4 years ago

https://github.com/vuejs/vue-jest/issues/185#issuecomment-507727024

Please see this comment.

drewbaker commented 4 years ago

I'm not using Jest, just trying to use it in a Nuxt project.