lathonez / clicker

Ionic 2 + @angular/cli Seed Project : Angular2 + Typescript + Karma + Protractor + Travis
http://lathonez.com/2018/ionic-2-unit-testing/
MIT License
430 stars 136 forks source link

Ionic2 unit testing npm test is working but ionic serve fails!! #167

Closed Asiq closed 7 years ago

Asiq commented 7 years ago

Here, I have followed all the steps from this and used the same in my project also. But npm test is running successfull, but fails with ionic serve.

ionic serve it throws error with "cannot find name 'describe,beforeEach,it and expect'". Could you please help me out on this. If you need more details also let me know.

tja4472 commented 7 years ago

Add the following to tsconfig.json, https://github.com/lathonez/clicker/blob/master/tsconfig.json#L19

  "exclude": [
    "node_modules",
    "e2e",
    "**/*.spec.ts"
  ],

See also #159

Asiq commented 7 years ago

Yes now it is working fine..Thanks @tja4472