vendredi 26 février 2016

What's the best way to set up unit testing in dart with the new test library?

There are a lot of resources out there for unit testing in dart using the old unittest library, but I can't find much about the test library, which was just released at the end of last year.

In unittest you could call useHtmlConfiguration() or useHtmlEnhancedConfiguration() that would serve up test results on localhost:8081 or whatever port you used with pub serve. The new library doesn't seem to have that, or at least it's not well documented. So my first question is: Is there a good way to run unit tests in the browser by typing localhost:8081 like with the old library, or does everything have to be done from the terminal?

I'm able to run the tests with pub run test:test --pub-serve=8081 -p firefox, but I'm just wondering if anyone has some "best practices" with this library to share since it's so new.

Aucun commentaire:

Enregistrer un commentaire