tolbertam / mocha-appveyor-reporter

Mocha reporter for AppVeyor CI Integration
Other
13 stars 5 forks source link

[#9] Wait until all tests sent before exiting #12

Closed tolbertam closed 7 years ago

tolbertam commented 7 years ago

Motivation:

Previously there was a small possibility that some tests would not be reported to AppVeyor before exiting. Change to not exit until all tests sent.

Modifications:

Mocha 2.1.0 introduces the capability of implementing a done(fn) on a reporter that allows the reporter to finish any pending work before exiting mocha. Implemented this function on AppVeyorReporter.

Additionally, reintroduced logic that batches tests together. Whenever 100ms elapses or 100 tests are enqueued, tests are sent to AppVeyor.

Set mocha requirement to 2.1.0+.

Bumped version to 0.3.0.

Result:

Mocha will not exit until tests are reported.

Added options appveyorApiUrl (APPVEYOR_API_URL), appveyorBatchSize (100), and appveyorBatchIntervalInMs (APPVEYOR_BATCH_INTERVAL_IN_MS).