Adding Chai HTTP (https://www.chaijs.com/plugins/chai-http/) to a Node project tests.
Using the plugin (as in the documentation) is using:
var chai = require('chai') , chaiHttp = require('chai-http'); chai.use(chaiHttp);
I’m wonder if I need to add
chai.use(chaiHttp); in every test file I’m using chaiHttp? or can I setup chaiHttp once in one of the tests?
can it be in a common file?
Go to Source