polymer-dart / todo_ddc

15 stars 3 forks source link

Is there a way to writer unit tests for polymerized apps? #10

Open StepFischer opened 7 years ago

StepFischer commented 7 years ago

Hey there,

I am currently evaluating your work and it is sure the best way to create a dart+polymer2 app.

But, I have tried to write some unit test for the example with no luck. Is there any hint to write some test against the components/modules?

Tank you very much.

dam0vm3nt commented 7 years ago

I think we have first to wait for package:test support in pub + dartdevc. I'm talking about this topic with dart team people.

Anyway my intention is to support the usual dart test framework : package:test.

StepFischer commented 7 years ago

Nice. Thank you for the quick answer. We'll looking forward to use polymerize in our products, if a small test environment is available.

dam0vm3nt commented 7 years ago

polymerize 0.9.4 is out with test support. Check this project to quickly see how to write a sample test, I'll write a post on www.dart-polymer.com soon with detailed instructions.

To run the test you MUST use pub serve and chrome:

pub serve test &
pub run test --pub-serve=8080 -p chrome

Then wait and check for results.

dam0vm3nt commented 7 years ago

See Testing with polymerize to learn how to write tests for polymerize.