node.jsunit-testingtestingautomated-testsadonis.js

How to run a unique test in Adonis.js


I have a problem here. I need to test just the 'montagem-ambiente' without run 'usuario', but, when a run adonis test he will run all the test in the folder.

I already try adonis test -f 'filename' and adonis test group 'filename' and the path file, but i could not understand how these commands works.

seeing the adonis test -hi cannot understand how to solve my problem

In adonis docs, i dont find the answer

Test images

In Adonis forum i see a topic with a same problem, but i cannot understand how to apply in my case

Some superhero over here can help me?


Solution

  • I found the answer... Well... It's embarrassing but it can help someone who is just starting out like me...

    Its just

    adonis test --files test/unit/montagem-ambiente.spec.js or adonis test -f test/unit/<name>

    I hope to help anyone!