Questions tagged [japa]

Japa is an embeddable test runner for Node.js

Official docs: https://github.com/thetutlage/japa

6 questions
1
vote
1 answer

Transaction query already complete, run with DEBUG=knex:tx

when I work with japa test runner adonisJs 5 my test failed and got this error: × Uncaught exception Transaction query already complete, run with DEBUG=knex:tx for more info 1 completedError …
1
vote
1 answer

How do I rollback adonisjs database before running functional tests with japa?

I set up my bootstrap file to run a few TestUtil commands so that I can migrate and seed my test database before running my full functional test suite. The problem that I'm running in to is when my seeder for creating Admin user runs it fails…
mattwallace
  • 4,132
  • 6
  • 43
  • 77
0
votes
0 answers

im getting assert.equal is not a function while using japa testing framework

I'm getting "assert.equal is not a function" while using japa testing framework The error: The configuration: I'm expecting the test runs as expected, but it keeps throwing an error. I made sure to install assert when I installed japa from the…
Barbs
  • 1
0
votes
0 answers

AdonisJS + Japa: How to create a test database for E2E tests

I'm currently trying to create a test database when running my E2E tests. For my Project I am running a docker Postgres instance (as my "prod" db). So to prevent tests from accessing or changing real data I want to create a new test database when…
user2037559
  • 77
  • 1
  • 2
  • 15
0
votes
0 answers

Adonis 5 Mongoose unit test

I'm using Japa to create a Unit test for my adonis 5 projects, Somehow when I try to run my unit test in my local environment(Mac Os) without mongodb, my unit test was running well, and it was ignoring the connection error. But when I try to run it…
0
votes
1 answer

Change production env to test env in adonis 5

I am implementing the tests in adonis 5 and would like to change the production .env to the test .env.test. In the production env I use the postgres database and in the test env I use the sqlite database. During the execution of the tests I add and…