News
Stay up to date with everything you need to know about Japa. Official releases, community contributions, and social mentions, all are covered in the news timeline.
- Date
@japa/snapshot
New plugin - @japa/snapshot
is a snapshot testing plugin for Japa. You can use it to write snapshot tests for your code. Also includes inline snapshots, and extends the assert
and expect
APIs with snapshot assertions.
- Date
@japa/browser-client
New plugin - The @japa/browser-client
plugin is built on top of Playwright, and you can use it for writing
end-to-end browser tests using it.
- Date
@japa/file-system
New plugin - The @japa/file-system
plugin is a thin wrapper over the fs module for easier file system management during tests. The plugin also extends the assert plugin to write assertions for the file system.
- Date
Improvements in reporters
- Spec reporter now prefixes the pinned tests with the
PINNED
label for better visual feedback. - The base reporter now displays the tests summary in compact mode.
- Date
@japa/expect-type
New plugin - The expect-type
plugin allows you to write assertions for the static TypeScript types. Think of them as additional guards to ensure that during refactoring you are not messing up with the types a method returns or accepts.
- Date
@japa/dot-reporter
New reporter - The dot reporter is a minimalist reporter that displays a dot for each passing test and a cross for each failing test. You might consider using the dot reporter in a CI workflow to keep the output clean.
- Date
Improvements to filtering layer
The @japa/runner
version 2.1.0
brings improvements to the filtering layer of the tests runner. It improves performance since the parent layers do not run when all the children are filtered out.
For example: If you apply a filter that disables all the tests within a group, that group will not execute its hooks. Earlier it was not the case.
- Date
Launch official VSCode extension
Julien from the core team created the VSCode extension to run individual tests and all tests inside a file directly from your code editor.
- Date
Youtube session with Kelvin Omereshone
During our Youtube session, we build a dummy RESTful API using AdonisJS. Also, we use the Japa API client and OpenAPI testing feature to test our API endpoints.
- Date
@japa/preset-adonis
New integration - The AdonisJS integration creates a bridge between AdonisJS and Japa. Also, the AdonisJS packages can resolve Japa classes from the IoC container to further extend them during the lifecycle of an AdonisJS app.
- Date
@japa/api-client
New plugin - The API client plugin of Japa makes it super simple to test your API endpoints over HTTP. You can use it to test any HTTP endpoint that returns JSON, XML, HTML, or even plain text.
- Date
Mentioned in the Github release radar post
We are thankful to Github for mentioning Japa in their monthly release radar post 🙏
- Date
Support for dynamic test titles
Tests using datasets can now reference values of the current iteration within the test title.
In the following example, you access the email
property by wrapping it inside the single curly braces.
test('validate email - {email}')
.with([
{
email: 'some+user@gmail.com',
},
{
email: 'email@example.com (Joe Smith)',
},
])
.run(({ assert }, { email }) => {})
- Date
Support for test suites
Test suites allow you to organize your tests by their type. For example, you can create separate suites for unit tests and functional tests.
- Date
Rewrite from scratch
Japa has received a massive rewrite, and all the packages have been moved to the @japa
npm scope. The existing package
japa is replaced with
@japa/runner.