Testing angular2 dart component

2019-05-28 23:09发布

问题:

I wrote a component and want to test it.

How can I write a test from component? Is there any test framwork for angular2dart?

回答1:

You can use the test package with the experimental testing implementation https://github.com/dart-lang/angular2/blob/master/lib/testing_experimental.dart I haven't seen examples and I haven tried it myself yet.

See also https://github.com/matanlurey/angular2_api_examples/tree/master/testing/test

I found a few tests using it in https://github.com/dart-lang/angular2/search?utf8=%E2%9C%93&q=testbed and https://github.com/dart-lang/angular2/tree/master/lib/src/modules/testing/test



标签: angular dart