Releases: ngarbezza/testy
v7.1.0
Some achievements to celebrate this release: 100 closed issues and 14 contributors (1 new!)
Added
- [feature] Add numeric assertions for numerical comparisons: now we
have more semantic assertions to compare numbers, check out the readme/jsdoc for more info. Thank you,
@beluamat29, for your first contribution! 🎉
Fixed
- [bug] passing tests even if the objects under comparison are not equal:
this was a regression from a refactoring to add private methods in v7, it's not user-facing error.
v7.0.2
Fixed
- [bug] async test results mixup. Thank you, @mellster2012, for your first contribution! 🎉
v7.0.1
Fixed
- [bug] timer is gone: We restored the timer at the end of the test report.
v7.0.0
📆 first release in 1.5 years
👤 1 new contributor
💥 breaking changes (Node version + ES modules)
Breaking changes
-
💥 We migrated from CommonJS to ES Modules. This was a heavy change, and it will affect all the users, but we think it is the right step to go to support modern Node versions. Unfortunately, due to complexity generating the package, CommonJS will not be supported.ADR
#0013
was added with more info about this decision. -
💥 Node 18.x or higher is required. Support for Node 12.x, 14.x and 16.x has dropped. Support for Node 20.x is added. Commit
Added
-
[docs] API docs using JSDoc: all public methods and some internal ones are now documented, most of them with simple and easy-to-understand examples. This conforms a documentation more extensive than the README.
-
[feature] report source code location on failed/errored tests: if your test fails or raises an unexpected error, you'll now see a reference with the failed assertion so it's easier to debug tests with multiple assertions. The line is displayed next to the test name and failure message.
-
[feature] configurable per test timeout: we have a new configuration value,
timeoutMs
and it makes tests to end with error state if they are not executed within that timeout. -
[feature] Improve feedback for wrong usage of raises(): if any of the exception assertions is called with an actual object that is not a function, it will return a translated message with better feedback explaining it is invalid. The test is considered error instead of failure.
Fixed
-
[bug] exit code 0 and no tests run when a promise is not settled: bug that motivated the addition of the timeout feature. Now if you have tests that for some reason do not resolve or reject their promises, the tool will give you feedback about that.
-
[bug] failFast configuration parameter should fail if an invalid value is provided, thank you @ignacio-r for your first contribution! 🎉
v6.1.0
First 2022 release!
Added
- [feature] support for asynchronous tests, thank you
@JavierGelatti for the initial implementation!
Now we can useasync
/await
in test definitions.
Fixed
-
[bug] multiple before() or after() empty blocks can be added to a test suite
-
[bug] swallowed/not precise exception when before() or after() fails
Other changes
- Updates to the dev tools: eslint, github actions, code climate
- Added 10Pines as sponsor: thanks for the support!
v6.0.0
6.0.0 - 2021-11-21
👤👤 2 new contributors, drop support for Node < 12 and new features and bug fixes!
Breaking changes
- 💥 Node 12.x or higher is required. Support for Node 8.x and 10.x has dropped.
There is now an architectural decision record to specify how support will work
going forward. #214
Added
- [feature] isIdenticalTo() / isNotIdenticalTo() assertions, thank you @franciscojaimesfreyre, for your first contribution!
- [feature] better error reporting when loading test suite files
- [docs] italian translations, thank you @giovannipessiva for your first contribution!
Fixed
v5.1.0
Release date: 2021-01-14
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, thank you @adico1!
- [feature] isIncludedIn() and isNotIncludedIn() assertions, thank you @ask-imran for your first contribution!
- [feature] warning message when no tests found, thank you @niyonx for your first contribution!
- [feature] show error when a requested file does not exist, thank you @chelsieng for your first contribution!
- [feature] global error handler
Fixed
- [bug] suite and test names cannot be empty, thank you @ask-imran!
- [bug] includes() and doesNotInclude() matchers only work on Arrays, thank you @trochepablo for your first contribution!
- [bug] color for pending summary was not painted
- [bug] it was possible to mark tests as pending without specifying reason
Refactored
- rename "master" branch to "main"; also, an ADR was added to track the decision that we want a better vocabulary
- parametrizable i18n messages
- write more tests for the i18n module
- throw error objects instead of strings
- speed up tests by not creating error messages on successful assertions
- added some npm scripts for test coverage and dependencies graph
- changes in modularization: extract assertion and test result reporter
- add more tests and increased the current coverage (example 1, example 2)
- formatter object decoupled from console ui (ADR 0004 added here)
- avoid test doubles at all (ADR 0005 added here), removed test runner double
... and more minor cleanups.
v5.0.2
[5.0.2] - 2020-10-13
A hacktoberfest release! 5 bugs fixed and two new contributors! 💪
It also includes an improvement in the contribution guidelines, and records of architectural decisions (ADRs).
Fixed
- [bug] isEmpty / isNotEmpty failing when passing an undefined value: thank you, @abraaoduarte for your first contribution!
- [bug] validate argument types of test(): thank you, @adico1 for your first contribution!
- [bug] raises() does not pass when throwing a non-primitive object
- [bug] toString() is not honored when printing objects
- [bug] cannot run testy binary using npx
v5.0.1
Fixed
- [bug] includesExactly uses === as comparison: Now the same criteria as
isEqualTo
is used inincludes
,doesNotInclude
andincludesExactly
.
v5.0.0
5️⃣ 🎉 new release! Including some breaking changes.
Breaking changes
- There's no need for a testy runner file, now there's a testy binary that runs the suites for you based on a configuration file. In other words, before: you have to call testy; now: testy calls you 😃
- Node 6.x is no longer supported. Now Node 8.x is the minimum version required.
Added
- [feature] configuration to run tests in random order: to ensure test isolation and therefore having robust suites 💪
- [feature] allow to pass multiple test paths to run testy: this allows to have more flexibility and control which files we want to run
- [documentation] docs in Spanish: now both README and CONTRIBUTING files are translated and updated in English and Spanish.
- [feature] testy binary: breaking change, this makes testy more easy to be executed. There's a
testy
script that can be run globally or throughnpx
. - [feature] read configuration parameters from JSON file: in order to run testy from a binary file, we now need a place to specify the configuration. Starting on v5, every project can have a
.testyrc.json
with the desired configuration parameters. Default values will be used in case the file is not present. - [feature] testy start message: now testy says "Hi!" when starting to run tests.
- [documentation] v5 revamped docs: new README with all the v5 features, and a more clear step by step guide. Also, there are links for v4 docs. Spanish and English.
- [feature] -h/--help command line option: now that we have a binary, we need a help option! Added a simple.
- [feature] -v/--version command line option: simple text displaying the current version.
- [feature] isNull() and isNotNull() assertions: checking for null now has a specific assertion with a helpful error message.
- [feature] matches() assertion: other important assertion added to the core; check if a string matches a regex (or another string!).
Changed
- [version] Node 8.x is the minimum version (breaking change)
- [internal] use eslint as linter for the tool: this is a good step forward having more consistency in this codebase.
- [documentation] add documentation issue type: keeping the repo more accessible for contributors.
- [documentation] explain how CI and our linter works: helpful for contributors