-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
how to write tests ? #164
Comments
You could still use TestComponentBuilder because it has the most features for testing. Basically you'd be bootstrapping a 'testbed' component, just in order to grab your service and make assertions against it. A general example seen here: https://github.com/ngUpgraders/ng-forward/blob/master/lib/testing/test-component-builder.spec.ts#L230-L330 Here's how you grab a service from the testbed: https://github.com/ngUpgraders/ng-forward/blob/master/lib/testing/test-component-builder.spec.ts#L328 |
I finally made it without TCB.
Do you think it is a better solution ? |
Hello,
the testing documentation is not clear about how to write tests with ngForward. Here is a service I would like to test :
for the spec file, I was thinking about something like that skeleton:
Is it possible to get more documentation about testing services, pipes, components please ? maybe full example ?
regards
The text was updated successfully, but these errors were encountered: