Closed
Description
I can't find a solution to run integration tests under authentication.
Is the Chai .auth('user', 'pass')
working ?
beforeEach(function(done) {
request(app)
.get('/api/searches')
.auth('test@example.com', 'test')
.expect(200)
.expect('Content-Type', /json/)
.end((err, res) => {
if (err) {
return done(err);
}
searchs = res.body;
done();
});
});
Item | Version |
---|---|
generator-angular-fullstack | 3.7.6 |
Item | Answer |
---|---|
Transpiler | Babel |
Markup | HTML |
CSS | SCSS |
Router | ui-router |
Client Tests | Mocha |
DB | MongoDB |
Auth | Y |
Metadata
Metadata
Assignees
Labels
No labels