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

New plugin - @japa/snapshot

@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.

Plugin documentation
Github repo

Date

New plugin - @japa/browser-client

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.

Plugin documentation
Github repo

Date

New plugin - @japa/file-system

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.

Plugin documentation
Github repo

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.

Base reporter release notes
Spec reporter release notes

Date

New plugin - @japa/expect-type

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.

Plugin documentation

Date

New reporter - @japa/dot-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.

Reporter documentation

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.

View release notes

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.

Download Extension
Support Julien on Github

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.

Link to the session video

Date

New integration - @japa/preset-adonis

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.

Integration repo

Date

New plugin - @japa/api-client

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.

Plugin repo
API client docs

Date

Mentioned in the Github release radar post

We are thankful to Github for mentioning Japa in their monthly release radar post 🙏

Link to 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 }) => {})

View release notes
Learn more about dynamic test titles

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.

View release notes
Learn more about suites

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.