- Upcoming
- 4.2.0
- 4.1.7
- 4.1.6
- 4.1.5
- 4.1.4
- 4.1.3
- 4.1.2
- 4.1.1
- 4.1.0
- 4.0.1
- 4.0.0
- 3.1.0
- 3.0.1
- 3.0.0
- 2.1.0
- 2.0.0
- 1.4.1
- 1.4.0
- 1.3 and earlier
2024-09-02
- Update
glob
dependency to v9.
2023-03-10
- new API that timetout and race-condition proof. Assertions and spies that run after a test is done are registered as failures. This is opt-in for now, it will become the default in v5 (the old API will become opt-in at that point to ease the transition).
- Escape percent signs in the report in Node.js, fix #57. Thanks to @LeXofLeviafan for the report.
2023-01-20
- Explicitly
exit()
the process after all test have passed, to avoid the process hanging due to a danglingsetInterval
somewhere (by Már Örlygsson, #51). - Tweak the CLI test suite to accomodate the new
pnpm
output on error. - Misc repo maintenance
2022-05-19
.deepEquals()
now ignores non-enumerable keys. This makesseamless-immutable
objects comparable and fixes #24.
2022-05-19
-
Properly interpolate values when using assertions to tag templages
o(x).equals(y)`Description that interpolates ${context}`
Will work as expected. This fixes #43
2022-05-19
- Work around a Rollup limitation, fixes #25 Thanks to Ivan Kupalov for the report and preliminary fix.
- Properly handle objects with a null prototype in
.deepEquals
assertions. Fixes #41
2022-05-18
- Fix post-install crash introduced in v4.1.2
2022-05-17
2020-04-07
- Fix the runner for Node.js v12 (which parses dynamic
import()
calls, but rejects the promise) - Fix various problems with the tests
2020-04-06
- General cleanup and source comments. Drop the "300 LOC" pretense.
ospec
has grown quite a bit, possibly to the point where it needs a new name, since the lib has diverged quite a bit from its original philosophy (#18) - Add native support for ES modules in Node versions that support it (#13)
- deprecate
--require
and intrduce--preload
since it can not load both CommonJS packages or ES6 modules (--require
is still supported with a warning for easing the transition). - Add a test suite for the CLI runner ((cjs, esm) × (npm, yarn, nodejs)) (#17)
- Improve ergonomics when tests fail. (#18)
- Correctly label assertions that happen in hooks.
- Errors thrown cause the current spec to be interrupted ("bail out")
- The test runner tolerates load-time failures and reports them.
- Once a test has timed out, assertions may be mislabeled. They are now labelled with
???
until the timed out test finishes.
- Add experimental
.satisfies
and.notSatisfies
assertions (#18, partially address #12). - Add
o.metadata()
which, witho().statisfies()
opens the door to snapshots. (#18)
- The
timeout
argument for tests has long been declared deprecated, but they were still documented and didn't issue any warning on use. Not anymore (#18) - Give spies the name and length of the functions they wrap in ES5 environments (#18, fixes #8)
- Make the
o.only
warning tighter and harder to ignore (#18) - Lock Zalgo back in (the first test was being run synchronously unlike the following ones, except in browsers, where the 5000 first tests could have run before the first
setTimout()
call) (#18) - Fix another corner case with the done parser #16 @kfule
- Fix arrow functions (
(done) => { }
) support in asynchronous tests. (#2 @kesara)
2019-08-18
- Fix
require
with relative paths
2019-07-24
- Pull ESM support out
2019-02-07
- ospec: Test results now include
.message
and.context
regardless of whether the test passed or failed. (#2227 @robertakarobin) - Add
spy.calls
array property to get thethis
andarguments
values for any arbitrary call. (#2221 @isiahmeadows) - Added
.throws
and.notThrows
assertions to ospec. (#2255 @robertakarobin) - Update
glob
dependency.
2018-06-30
2018-06-26
- Better input checking to prevent misuses of the library. Misues of the library will now throw errors, rather than report failures. This may uncover bugs in your test suites. Since it is potentially a disruptive update this change triggers a semver major bump. (#2167)
- Change the reserved character for hooks and test suite meta-information from
"__"
to"\x01"
. Tests whose name start with"\0x01"
will be rejected (#2167)
- Give async timeout a stack trace that points to the problematic test (#2154 @gilbert, #2167)
- deprecate the
timeout
parameter in async tests in favour ofo.timeout()
for setting the timeout delay. Thetimeout
parameter still works for v3, and will be removed in v4 (#2167) - add
o.defaultTimeout()
for setting the the timeout delay for the current spec and its children (#2167) - adds the possibility to select more than one test with o.only (#2171)
- Detect duplicate calls to
done()
properly #2162 (#2167) - Don't try to report internal errors as assertion failures, throw them instead (#2167)
- Don't ignore, silently, tests whose name start with the test suite meta-information sequence (was
"__"
up to this version) (#2167) - Fix the
done()
call detection logic #2158 and assorted fixes (accept non-English names, tolerate comments) (#2167) - Catch exceptions thrown in synchronous tests and report them as assertion failures (#2171)
- Fix a stack overflow when using
o.only()
with a large test suite (#2171)
2018-05-25
- Pinpoint the
o.only()
call site (#2157) - Improved wording, spacing and color-coding of report messages and errors (#2147, @maranomynet)
2018-05-09
- Added
--require
feature to the ospec executable (#2144, @gilbert) - In Node.js, ospec only uses colors when the output is sent to a terminal (#2143)
- the CLI runner now accepts globs as arguments (#2141, @maranomynet)
- Added support for custom reporters (#2020, @zyrolasting)
- Make ospec more Flems-friendly (#2034)
- Works either as a global or in CommonJS environments
- the o.run() report is always printed asynchronously (it could be synchronous before if none of the tests were async).
- Properly point to the assertion location of async errors #2036
- expose the default reporter as
o.report(results)
- Don't try to access the stack traces in IE9
2018-05-03
- Identical to v1.4.0, but with UNIX-style line endings so that BASH is happy.
2017-12-01
- Added support for async functions and promises in tests (#1928, @StephanHoyer)
- Error handling for async tests with
done
callbacks supports error as first argument (#1928) - Error messages which include newline characters do not swallow the stack trace #1495 (#1984, @RodericDay)
- Log using util.inspect to show object content instead of "[object Object]" (#1661, @porsager)
- Shell command: Ignore hidden directories and files (#1855 @pdfernhout))
- Library: Add the possibility to name new test suites (#1529)