Is there a capybara for Node.js?

前端 未结 8 943
情话喂你
情话喂你 2021-02-05 03:35

Does anyone know whether there is anything similar to capybara for Node.js?

相关标签:
8条回答
  • 2021-02-05 04:09

    Yes, see expresso and more here - Unit testing framework for node.js that specifically supports testing async code?

    0 讨论(0)
  • 2021-02-05 04:14

    I'm a rails-turned-node developer and I've always been looking for a analogy in the JS world for the winning RSpec/Capybara combination. Here is what I've found what I like best.

    • Mocha - for running asynchronous tests
    • Chai - for assertions
    • Request - for handling HTTP request/response
    • Cheerio - for selecting HTML elements from responses

    Here is a more involved post on how to set up this stack including continuous test running.

    Happy Testing!

    0 讨论(0)
提交回复
热议问题