Skip to content

Commit

Permalink
Merge pull request #186 from ngarbezza/release-v5.1.0
Browse files Browse the repository at this point in the history
Release v5.1.0
  • Loading branch information
ngarbezza authored Jan 14, 2021
2 parents 8cd56f9 + 52d0813 commit b8ed563
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 5 deletions.
37 changes: 36 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Everything is released. Yay! :tada:

## [5.1.0] - 2021-01-13

This release includes a lot of contributions (4 new contributors!), and several refactorings to continue improving the quality of the tool.

### Added

* [[feature] added after() hook to run code after each test](https://github.com/ngarbezza/testy/issues/135), thank you @adico1!
* [[feature] isIncludedIn() and isNotIncludedIn() assertions](https://github.com/ngarbezza/testy/issues/75), thank you @ask-imran for your first contribution!
* [[feature] warning message when no tests found](https://github.com/ngarbezza/testy/issues/157), thank you @niyonx for your first contribution!
* [[feature] show error when a requested file does not exist](https://github.com/ngarbezza/testy/issues/158), thank you @chelsieng for your first contribution!
* [[feature] global error handler](https://github.com/ngarbezza/testy/issues/177)

### Fixed

* [[bug] suite and test names cannot be empty](https://github.com/ngarbezza/testy/issues/136), thank you @ask-imran!
* [[bug] includes() and doesNotInclude() matchers only work on Arrays](https://github.com/ngarbezza/testy/issues/130), thank you @trochepablo for your first contribution!
* [[bug] color for pending summary was not painted](https://github.com/ngarbezza/testy/issues/173)
* [[bug] it was possible to mark tests as pending without specifying reason](https://github.com/ngarbezza/testy/issues/172)

### Refactored

* [rename "master" branch to "main"](https://github.com/ngarbezza/testy/issues/133); also, an ADR was added to track the decision that we want a better vocabulary
* [parametrizable i18n messages](https://github.com/ngarbezza/testy/issues/71)
* [write more tests for the i18n module](https://github.com/ngarbezza/testy/issues/179)
* [throw error objects instead of strings](https://github.com/ngarbezza/testy/issues/176)
* [speed up tests by not creating error messages on successful assertions](https://github.com/ngarbezza/testy/commit/531d1d6360c93a3aae2f11bd0c957c45e93cd35c)
* [added some npm scripts for test coverage and dependencies graph](https://github.com/ngarbezza/testy/commit/d4ca1fa7804b2353458eb214d1f302fefc9fed9d)
* [changes in modularization: extract assertion and test result reporter](https://github.com/ngarbezza/testy/commit/4913b5a187bc0700b3de4b5b1a9adc0e2a8dc57e)
* add more tests and increased the current coverage ([example 1](https://github.com/ngarbezza/testy/commit/be41db9872ea4490b5dae238d6c553b214667326), [example 2](https://github.com/ngarbezza/testy/commit/28b2ee51078300382c7398cb40203d6e40ca26d1))
* formatter object decoupled from console ui (ADR 0004 added [here](https://github.com/ngarbezza/testy/commit/9ab5c55fd4738054effef1e1aab15824a62c6750))
* avoid test doubles at all (ADR 0005 added [here](https://github.com/ngarbezza/testy/commit/5a65fbc6e6e58b1f03f996c381240d4a1b8c3875)), removed test runner double

... and more minor cleanups.

## [5.0.2] - 2020-10-13

A hacktoberfest release! 5 bugs fixed and two new contributors! :muscle:
Expand Down Expand Up @@ -205,7 +239,8 @@ readable and extensible. It also includes a huge internal refactor to make the t
### Changed
- Fix passed count at test runner level (no reported issue)

[Unreleased]: https://github.com/ngarbezza/testy/compare/v5.0.2...HEAD
[Unreleased]: https://github.com/ngarbezza/testy/compare/v5.1.0...HEAD
[5.1.0]: https://github.com/ngarbezza/testy/compare/v5.0.2...v5.1.0
[5.0.2]: https://github.com/ngarbezza/testy/compare/v5.0.1...v5.0.2
[5.0.1]: https://github.com/ngarbezza/testy/compare/v5.0.0...v5.0.1
[5.0.0]: https://github.com/ngarbezza/testy/compare/v4.4.0...v5.0.0
Expand Down
20 changes: 20 additions & 0 deletions doc/decisions/0006-avoid-offensive-vocabulary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 6. Avoid offensive vocabulary

Date: 2021-01-13

## Status

Accepted

## Context

There is an initiative about questioning the technical vocabulary we use, and avoiding some words that are widely used and may offend people. This is a project that adheres to this initiative, therefore...

## Decision

Remove all existing technical vocabulary that might be offensive, and prevent those terms to be added in the future. For instance, the use of "master/slave" replaced by "main/replica" (or similar), or "whitelist/blacklist" by "safelist/blocklist" (or similar).

## Consequences

* Supporting causes like Black Lives Matter and let all people know that their voices are heard.
* Having a friendly place for all contributors around the world.
10 changes: 8 additions & 2 deletions lib/test_runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,18 @@ class TestRunner {
this._randomizeSuites();
this._suites.forEach(suite => {
this._setCurrentSuite(suite);
const context = { failFastMode: this._failFastMode, randomOrderMode: this._randomOrder };
suite.run(context);
suite.run(this._executionContext());
});
this._callbacks.onFinish(this);
}

_executionContext() {
return {
failFastMode: this._failFastMode,
randomOrderMode: this._randomOrder,
};
}

setResultForCurrentTest(result) {
this._currentSuite.currentTest().setResult(result);
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pmoo/testy",
"version": "5.0.2",
"version": "5.1.0",
"description": "A minimal testing framework, for educational purposes.",
"homepage": "https://ngarbezza.github.io/testy/",
"repository": {
Expand Down

0 comments on commit b8ed563

Please sign in to comment.