allure-framework / allure-js-commons

Deprecated, use https://github.com/allure-framework/allure-js instead
Other
27 stars 40 forks source link

Add posibility to clean up dir before tests #19

Closed brbrr closed 7 years ago

brbrr commented 8 years ago

with cleanDir option

var allure = new Allure();
allure.setOptions({ cleanDir: true });

allure results dir would be cleaned up before start

just-boris commented 8 years ago

Hello, thanks for your contribution!

But, unfortunately, I cannot accept your changes.

BROWSER=chrome npm test && BROWSER=firefox npm test

There your solution also wouldn't work.

Also I understand our fault that we haven't provided any official solution to clean up result dir before test start. Actually we have this in example with Mocha. If you run your tests with npm test command, the pretest script also will be automatically executed before main test script, so this is a good place to put cleanup command.

@brbrr will this solution help you?

just-boris commented 7 years ago

Closing due to inactivity