When I run the test, the console.logs in the method does not get output in the terminal. I need it because the tests are failing and I cant debug why, all I could do is swear lol.
Sample code here:
// order.spec.js
...
test('As a user who is registered with the site I can create an order', async ({ client }) => {
await Factory
.model('App/Models/Tenant')
.create()
const user = await User.create(newUser)
const response = await client
.post('/orders')
.header('tenant_subdomain', 'test')
.loginVia(user, 'jwt')
.send(order)
.end()
response.assertStatus(200)
})
...
// OrderController
...
// The test above goes to this method.
async store({ request, response }) {
...
// This console.log does not output on the terminal :(
// its so hard to debug whats wrong.
console.log('AAAAAAAAAAAAA')
...
}
Aucun commentaire:
Enregistrer un commentaire