Posts

Showing posts with the label Firsby

Firsby for Unit test Firebase REST API

Firebase required to iniciate in order to run test cases. Firsby is a api testing fromwork ,which can work with jasmine.  npm install jasmine-node -g Install frisby.js http://frisbyjs.com/ Create spec file witih spec folder Import depeldancy var request = require("request"); var server = require("./../src/test.js");   // server file var frisby = require('frisby'); Header value for every request frisby.globalSetup({ request: { headers: {'AccessToken':process.env.test_token}. // taken from the .env } }); Dependent Request frisby.create(' Login')   .post(process.env.npm_config_host+'/api/login',{.  //take the host when running test command         "profile-type": "test",         "mess-token":"" }) .after(function(err, res, body) {   frisby.create('Dome')     .post(process.env.npm_config_host+'/api/user',{           "profile-type": ...