BDD and TDD for node.js?

前端 未结 11 1451
北恋
北恋 2021-01-29 20:37

What is used for BDD and TDD with node.js?

I\'m used to use Cucumber + RSpec. What\'s a good combo for node.js?

thanks

11条回答
  •  花落未央
    2021-01-29 21:20

    If you are used to rspec, Jasmine is pretty nice. I've not used it on Node.js, but I have used it for testing a backbone app. It's syntax is very similar to rspec. Taken from the site above:

    describe("Jasmine", function() {
      it("makes testing JavaScript awesome!", function() {
        expect(yourCode).toBeLotsBetter();
      });
    });
    

    It's listed in the link provided by Alfred above, but since folks listed Vows as an example, I figured I'd give Jasmine a bump, especially since it's syntactically similar to rspec ;)

提交回复
热议问题