Is there a capybara for Node.js?

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

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

8条回答
  •  忘掉有多难
    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!

提交回复
热议问题