Several New Expectations

Originally published: 2026-09-16

In the last two weeks, Best has seen several new releases beginning with a small SemVer breaking change. The change is in the format of the CLI output, so there is no need to update any of your tests or change the CLI command that you use to run Best.

But just in case you were piping Best's output to anything and depending on a particular format (which I don't necessarily recommend, but also I can't prevent you from doing), be aware that is the thing that has changed since v0.2.x.

This latest batch of v0.3.x releases includes several new expectations and the ability to create todo items in test files.

Recent Releases

New Expectations

Number Comparison

String Comparison

File System

Todo Items

Todo items work pretty much the same as skipped tests. You can include or omit an expectation; either way the expectation is never run. Skipped tests and todo items are counted differently in the test output summary, in case you prefer one or the other for certain things.

For example:

it "should be a todo item"; todo

it "should also be a todo item"; {
    todo
    expect 1 # <-- This line will not run
    to_be 1  # <-- This line will not run
}

Wrapping Up

There have been several internal refactorings and improvements to the source code and unit tests. The ./tests/ directory contains many examples of how to use each expectation and modifier.

Some official documentation will be coming soon, and Best will be getting some more expectations in the coming weeks. Best will also be getting hooks such as before_all, before_each, after_all, and after_each. Hooks are still currently in the design phase, and will likely require a bit of rewriting some of Best's internals, but API-breaking changes are not expected at this time.