I have the following test, written with Frisby.js :
var frisby = require('frisby');
var CONSTS = {
server: 'http://localhost:8000',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
};
frisby.create('Ensure we are dealing with a teapot')
.get(CONSTS.server + '/isAlive', {headers: CONSTS.headers}, {json: true})
.timeout(10000)
.expectStatus(200)
.toss();
I am getting this result:
Failures:
1) Frisby Test: Ensure we are dealing with a teapot
[ GET http://localhost:8000/isAlive ]
Message:
Expected 500 to equal 200.
When I am executing this via Postman or through the browser I am getting the correct result, which is:
{
"alive": true
}
Also, when testing remote endpoints it seems to be working.
What did I do wrong?