kadoshms / ionic2-autocomplete

Ionic 2 autocomplete component
MIT License
149 stars 108 forks source link

test suite failed to run #145

Closed biaggi closed 6 years ago

biaggi commented 6 years ago

Hi all, I've used this component in my project and it's working like charm, but I've found an issue trying to run the tests, using jest I receive the following error

src/pages/lead/leadCreate/leadCreatePage.spec.ts ● Test suite failed to run

/home/user/securitas/sst/node_modules/ionic2-auto-complete/index.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import { Component, EventEmitter, HostListener, Injectable, Input, NgModule, Output, Pipe, ViewChild } from '@angular/core';
                                                                                         ^^^^^^

SyntaxError: Unexpected token import

  at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:305:17)
  at Object.<anonymous> (src/components/components.module.ts:11:53)
  at Object.<anonymous> (src/pages/lead/leads.module.ts:14:45)

Am I doing anything wrong?

kadoshms commented 6 years ago

Hey @biaggi thanks for your feedback. There's no valid tests suits at the moment, but you are most welcome to write some and make a PR :)

biaggi commented 6 years ago

Sorry, I was completely lost when I wrote this issue, the real issue is that jest is not compliant with the way in which this component was written, not your fault at all. You can freely close this issue.

Thanks anyway :-)