So im trying to run some tests in my project and this is the error I get when I run gulp test:client
.
I couldn't find much information about it and I really don't get why this is happening. My project is based on the Angular Fullstack Generator 4.2.0.
Node version is 6.10 and npm 4.5.
Any hint is really appreciated.
Thanks!
pablos-mbp:widget pablo$ gulp test:client
31 08 2017 11:02:14.747:INFO [PhantomJS 2.1.1 (Mac OS X 0.0.0)]: Connected on socket xrwLxHjkTkNLJhc3AAAA with id 5085667
31 08 2017 11:02:14.747:DEBUG [launcher]: PhantomJS (id 5085667) captured in 1.392 secs
31 08 2017 11:02:14.753:DEBUG [phantomjs.launcher]:
31 08 2017 11:02:14.755:DEBUG [web-server]: serving: /Users/pablo/workspace/widget/node_modules/karma/static/context.html
31 08 2017 11:02:14.758:DEBUG [middleware:source-files]: Requesting /base/node_modules/jasmine-core/lib/jasmine-core/jasmine.js?73bc53d3671677e6a093fc74e4f9bcde57e5f7ad /
31 08 2017 11:02:14.758:DEBUG [middleware:source-files]: Fetching /Users/pablo/workspace/widget/node_modules/jasmine-core/lib/jasmine-core/jasmine.js
31 08 2017 11:02:14.759:DEBUG [web-server]: serving (cached): /Users/pablo/workspace/widget/node_modules/jasmine-core/lib/jasmine-core/jasmine.js
31 08 2017 11:02:14.760:DEBUG [middleware:source-files]: Requesting /base/node_modules/karma-jasmine/lib/boot.js?945a38bf4e45ad2770eb94868231905a04a0bd3e /
31 08 2017 11:02:14.760:DEBUG [middleware:source-files]: Fetching /Users/pablo/workspace/widget/node_modules/karma-jasmine/lib/boot.js
31 08 2017 11:02:14.761:DEBUG [web-server]: serving (cached): /Users/pablo/workspace/widget/node_modules/karma-jasmine/lib/boot.js
31 08 2017 11:02:14.761:DEBUG [middleware:source-files]: Requesting /base/spec.js?7a69f03490a6f80f910cff86fc37abc9ee7cd0f6 /
31 08 2017 11:02:14.762:DEBUG [middleware:source-files]: Fetching /Users/pablo/workspace/widget/spec.js
31 08 2017 11:02:14.762:DEBUG [middleware:source-files]: Requesting /base/node_modules/karma-jasmine/lib/adapter.js?7a813cc290d592e664331c573a1a796192cdd1ad /
31 08 2017 11:02:14.762:DEBUG [middleware:source-files]: Fetching /Users/pablo/workspace/widget/node_modules/karma-jasmine/lib/adapter.js
31 08 2017 11:02:14.762:DEBUG [web-server]: serving (cached): /Users/pablo/workspace/widget/spec.js
31 08 2017 11:02:14.819:DEBUG [web-server]: serving (cached): /Users/pablo/workspace/widget/node_modules/karma-jasmine/lib/adapter.js
Component: MainComponent
✓ should attach a list of things to the controller
PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 1 of 1 SUCCESS (0.003 secs / 0.035 secs)
TOTAL: 1 SUCCESS
31 08 2017 11:02:15.022:DEBUG [karma]: Run complete, exiting.
31 08 2017 11:02:15.022:DEBUG [launcher]: Disconnecting all browsers
31 08 2017 11:02:15.029:DEBUG [coverage]: Writing coverage to /Users/pablo/workspace/widget/coverage/client
31 08 2017 11:02:15.114:DEBUG [coverage]: Writing coverage to /Users/pablo/workspace/widget/coverage
31 08 2017 11:02:15.126:DEBUG [launcher]: Process PhantomJS exited with code 0
31 08 2017 11:02:15.126:DEBUG [temp-dir]: Cleaning temp dir /var/folders/n5/31jf7x153xx_b_yqskjlj5m00000gn/T/karma-5085667
31 08 2017 11:02:15.135:DEBUG [launcher]: Finished all browsers
[11:02:15] Finished 'test:client' after 6.12 s
pablos-mbp:widget pablo$ [default] /Users/pablo/workspace/widget/client/app/main/main.component.spec.ts:9:22
Property 'mock' does not exist on type 'IAngularStatic'.
[default] /Users/pablo/workspace/widget/client/app/main/main.component.spec.ts:10:22
Property 'mock' does not exist on type 'IAngularStatic'.
[default] /Users/pablo/workspace/widget/client/app/main/main.component.spec.ts:18:14
Cannot find name 'inject'.