Ready to get started?

Join Adocasts Plus for $8/mo, or sign into an existing Adocasts Plus account, to get access to all of our lessons.

robot mascot smiling

Pragmatic Testing in AdonisJS with Japa #4.1

Meet the API Client

In This Lesson

Learn how to use Japa's API Client for Functional Testing of AdonisJS routes. We'll install and register the plugin, and use the client in tests to make requests and assert against their responses.

Created by
@tomgobich
Published

Japa's API Client is structurally similar to Axios to work with, but is tailored toward testing and contains helpful assertions we can use to confirm expected behaviors.

First, though, we need to install and add this plugin to our Japa bootstrap file.

npm i -D @japa/api-client

Join the Discussion 0 comments

Create a free account to join in on the discussion
robot comment bubble

Be the first to comment!