Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/mocha test reporter #305

Merged
merged 114 commits into from
Jan 28, 2025
Merged

Conversation

chrisdp
Copy link
Collaborator

@chrisdp chrisdp commented Jan 7, 2025

image

If you would like to test the new reporter simply add the reporters array show below to your rooibos config object in your bsconfig.json file. Also if you want to enable asci colorization see the setting below as well:

  "rooibos": {
    ...
    "colorizeOutput": true,
    "reporters": [
      "mocha"
    ]
  }

instillation
If you would like to install a version of this branch we have an automation that automatically creates builds and posts the installation instructions as a comment on this pull request.

Changes:

  • Git diff/patch generation logic
  • Format patch into readable subset diff of actual and expected
  • Support colorization
  • Setting to disable colorization
  • Add new short hand to reporters array for mocha
  • Create new MochaTestReporter
  • Add execution time to test cases based on minimum threshold
  • Update docs to show new mocha reporter option
  • Create new onSuiteBegin, onTestGroupBegin, onTestBegin, onTestComplete, onTestGroupComplete, onSuiteComplete reporter hooks
  • migrate existing status logs into the ConsoleTestReporter using new hooks
  • Correct ConsoleTestReporter and JUnitTestReporter to use new event interfaces where applicable
  • Move debug logs not part of the reporters to new error, warning, info, debug, and trace log functions that are controlled with constants in the CommonUtils.bs
  • Add support for actual and expected strings to TestResults and the fail functions
  • Create new asMultilineString function
  • Update Assert functions to populate the actual and expected failure value where applicable
  • Update assertion failure messages to be more consistent and clear
  • Write failed examples for all updated Assertion functions
  • Add more tests for better coverage of when assertions should pass
  • Added new rooibos logs that will always log the PASS/FAIL status and that rooibos has shutdown after all reporters have logged their results
  • Updated CLI to use this new message allowing you to use other reporters other than just the ConsoleTestReporter with the CLI
  • Ignored tests are now iterated over for reporters to be able to log them in their results
  • Crashes in Assertions will now always report as a crash failure rather than a normal failure
  • Document new @slow() annotation

Fixes:

  • uninitialized can now be tested with eqValues
  • Fixed many crashes in assertions that could lead to false failures
  • Fixed some assertions that appeared to be broke (mostly around node tests)
  • Fixed some debugging logs that would state an error had occurred but in reality the tests where running fine
  • Custom messages are always passed if supplied
  • failCrash will use the message on the exception object unless a custom is supplied rather then always just reporting as "Error"

@chrisdp chrisdp added the enhancement New feature or request label Jan 7, 2025
@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on daa52a8. You can download it here or install it by running the following command:

npm install https://github.com/rokucommunity/rooibos/releases/download/v0.0.0-packages/rooibos-roku-5.14.0-feature-mocha-test-reporter.20250117203002.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on d0b2be6. You can download it here or install it by running the following command:

npm install https://github.com/rokucommunity/rooibos/releases/download/v0.0.0-packages/rooibos-roku-5.14.0-feature-mocha-test-reporter.20250120135137.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 68a7138. You can download it here or install it by running the following command:

npm install https://github.com/rokucommunity/rooibos/releases/download/v0.0.0-packages/rooibos-roku-5.14.0-feature-mocha-test-reporter.20250120190222.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 3f387f6. You can download it here or install it by running the following command:

npm install https://github.com/rokucommunity/rooibos/releases/download/v0.0.0-packages/rooibos-roku-5.14.0-feature-mocha-test-reporter.20250120202100.tgz

@chrisdp chrisdp marked this pull request as ready for review January 20, 2025 20:23
@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on b1a3b57. You can download it here or install it by running the following command:

npm install https://github.com/rokucommunity/rooibos/releases/download/v0.0.0-packages/rooibos-roku-5.14.0-feature-mocha-test-reporter.20250120202802.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 6b91e29. You can download it here or install it by running the following command:

npm install https://github.com/rokucommunity/rooibos/releases/download/v0.0.0-packages/rooibos-roku-5.14.0-feature-mocha-test-reporter.20250120204733.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on b5506e6. You can download it here or install it by running the following command:

npm install https://github.com/rokucommunity/rooibos/releases/download/v0.0.0-packages/rooibos-roku-5.14.0-feature-mocha-test-reporter.20250122140912.tgz

@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on e5f43b4. You can download it here or install it by running the following command:

npm install https://github.com/rokucommunity/rooibos/releases/download/v0.0.0-packages/rooibos-roku-5.14.0-feature-mocha-test-reporter.20250122154341.tgz

Base automatically changed from task/update-framework-folder-to-match-structure-on-device to master January 28, 2025 13:29
@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 9b80edf. You can download it here or install it by running the following command:

npm install https://github.com/rokucommunity/rooibos/releases/download/v0.0.0-packages/rooibos-roku-5.14.0-feature-mocha-test-reporter.20250128135959.tgz

@TwitchBronBron TwitchBronBron merged commit ebfd429 into master Jan 28, 2025
5 checks passed
@TwitchBronBron TwitchBronBron deleted the feature/mocha-test-reporter branch January 28, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-package create a temporary npm package on every commit enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants