#How and what all libs reqd for BDD
12 messages · Page 1 of 1 (latest)
I do agree with @cold mountain , nonetheless there is an example for cucumber like so https://github.com/rMarinf/nest-cucumber
@unkempt locust Thanks a lot. Im seeing too many libs like jest, mocha, chai, sinon, jasmine as well.
Just wanna knw is there any specific purposes for each of those or any common convention that something must be preferred for some sort of testing??
so that is there any best practices that if its unit/integration/behavior (BDD)/TDD, anything specific?
Do TDD n BDD have different libs to be used?
I feel like you don't completely understand what BDD is (same goes for TDD) here. They are just paradigms to test your application nothing more, nothing less. You only need a test runner.
For BDD there are libs out there to work with an actual specification (gherkin) like @unkempt locust mentioned -- but its not required. You only really want it if you want to integrate the contract with your actual customer otherwise its just bloat that adds extra work. If you still want to follow BDD practices then you can just create your own layer during the tests.
Regarding TDD, you might wanna read up on what it actually means.
Jest and Vitest are commonly used.
DSL layer that is
This is not a reel e2e test since you don't access to your app by making a real request to the endpoints :/
What? Cucumber has nothing to do with that. It's simply a way to utilize specifications for your tests, whatever the underlying driver is is up to you
Sure, just saying there's is no way to run unit test and real e2e test, since you called it e2e tests. It's unit test with "bdd" synthax
I never said it was a "e2e" test. However, you can do both. You will commonly see BDD at an end to end boundary and not on a unit boundary.