Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you explain unit test for event emitter? #28

Open
junjunruan opened this issue Feb 25, 2016 · 0 comments
Open

Can you explain unit test for event emitter? #28

junjunruan opened this issue Feb 25, 2016 · 0 comments

Comments

@junjunruan
Copy link

In angular-2-samples/unit-test-scenarios/event-emitter/event-emitter-spec.ts folder, can you explain the code there?

My understand about your code would be: you called the function sayHello() in the code manually.

  1. why don't you use mouse event function like click(). Of course, I don't know if there is such click function exist.
  2. why put child.sayHello(); after child.greeting.subscribe()?
  3. Can you explain how the done function work here? Is there any other way to handle asyn problem. I have heard that angular2 make it more easier to deal with the problem.
  4. When I looked at your blog: http://www.syntaxsuccess.com/viewarticle/angular-2.0-unit-testing. I still have some questions. Can you recommend me some reference to learn Angular2 an Angular2 unit testing?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant