Our first tests
Our first tests
We will structure our tests such that each controller will contain tests for each method. Go ahead and delete example.spec.js, then run this
adonis make:test User -f
# output: create: test/functional/user.spec.js
Replace the content of user.spec.js with this
"use strict";
const { test, trait } = use("Test/Suite")("User");
trait("Test/Ap
...Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy