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

Misleading component testing documentation #161

Open
DaSchTour opened this issue Oct 14, 2016 · 3 comments
Open

Misleading component testing documentation #161

DaSchTour opened this issue Oct 14, 2016 · 3 comments
Labels

Comments

@DaSchTour
Copy link

DaSchTour commented Oct 14, 2016

There are several issus with the component testing documentation.

  1. The $injector is missing, that should be created in beforeEach
  2. The test describes a FirstComponent that doesn't exist

From the given example it's hard to create a working test. All I tried always leads to TypeError: undefined is not a constructor (evaluating 'render(FirstComponent)')

@aciccarello
Copy link
Collaborator

@DaSchTour, thanks for the feedback. I hope to overhaul the testing documentation when working on #93. Can you link to a docs page so I can address this specific confusion?

@DaSchTour
Copy link
Author

Most confusing is the last part of https://hotell.gitbooks.io/ng-metadata/content/docs/api/testing/

After my initial comment I've also take a look on https://hotell.gitbooks.io/ng-metadata/content/docs/api/testing/function.html which creates even more confusion, as it doesn't use Jasmine for test description.

There are also some errors with missing ! in the test and the confusing usage of data and name.

@Hotell
Copy link
Member

Hotell commented Nov 15, 2016

the Api testing docs seems to be not updated but the function works as expected.

you can try that by yourself https://github.com/ngParty/Angular1-scaffold/blob/master/src/app/app.component.spec.ts

@Hotell Hotell added the docs label Nov 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants