olefirenko / vue-google-autocomplete

A Vue.js autosuggest component for the Google Places API.
https://olefirenko.github.io/vue-google-autocomplete/
MIT License
505 stars 258 forks source link

jest test of the page containing vue-google-autocomplete fails #99

Open dmitry-saritasa opened 5 years ago

dmitry-saritasa commented 5 years ago
import TripEditPage from './trip-edit-page';

describe('src/apps/admin/components/trips/trip-edit-page', () => {
  it('exports a valid component', () => {
    expect(TripEditPage).toMatchSnapshot();
  });
});

fails with

 FAIL  src/apps/admin/components/trips/trip-edit-page.unit.js
  ● Test suite failed to run

    /frontend/node_modules/vue-google-autocomplete/src/VueGoogleAutocomplete.vue:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){<template>
                                                                                             ^

    SyntaxError: Unexpected token <

      305 |     BaseRadio,
      306 |     FormGroup,
    > 307 |     TravelMap,
      308 |     DatetimeGroup,
      309 |     VueGoogleAutocomplete,
      310 |   },

      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:316:17)
      at src/apps/admin/components/trips/trip-edit-page.vue:307:30
      at Object.<anonymous> (src/apps/admin/components/trips/trip-edit-page.vue:674:3)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        0.183s
Ran all test suites matching /src\/apps\/admin\/components\/trips\/trip-edit-page.unit.js/i.

Watch Usage: Press w to show more.
luiz290788 commented 4 years ago

Were you able to fix this?

looplalouis commented 2 years ago

I'd also like to know did you manage to fix this, I have the same issue

jonatahr commented 1 year ago

same here, facing the same issue.