You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for taking the time to create an issue and including sample code. We have not had a chance to look into the details of your particular case but should by early next week (perhaps later with the upcoming US Holiday).
@DineshKumarGovindarajan87 From the information you have provided, it sounds like you are running into an issue with using Angular's dependency injection system. You might want to investigate more on the Angular side of things to determine how to provide a mocked Title.
Additionally, you might want to look at the documentation for td.verify once you've figured out how to provide the mocked value.
I think we should close this issue for now since I think it is outside of the scope of the testdouble.js project.
Description
MockService test case failed.
Issue
Environment
node -v
output: 10.16.0npm -v
(oryarn --version
) output: 6+npm ls testdouble
(oryarn list testdouble
) version: 3.3.0Failing Test
TypeError: this.appTitle.setTitle is not a function
at new AppComponent (http://localhost:9876/_karma_webpack_/webpack:/src/app/app.component.ts:14:19)
at createClass (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2015/core.js:24580:1)
at createDirectiveInstance (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2015/core.js:24400:1)
at createViewNodes (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2015/core.js:35006:1)
at createRootView (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2015/core.js:34878:1)
at callWithDebugContext (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2015/core.js:36407:1)
at Object.debugCreateRootView [as createRootView] (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2015/core.js:35644:1)
at ComponentFactory_.create (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2015/core.js:23542:1)
at initComponent (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2015/testing.js:3409:1)
at ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:359:1)
Example Repo
The text was updated successfully, but these errors were encountered: