UNPKG

biz9-remote

Version:

** Description

41 lines (40 loc) 1.2 kB
/* Copyright 2016 Certified CoderZ Author: Brandon Poole Sr. (biz9framework@gmail.com) License GNU General Public License v3.0 Description: BiZ9 Framework: Remote - Test */ const async = require('async'); const {Log} = require("biz9-utility"); const {Remote} = require("./"); /* * availble tests - connect */ /* --- DATA CONFIG END --- */ //9_connect - 9_test_connect describe('connect', function(){ this.timeout(25000); it("_connect", function(done){ console.log('CONNECT-START'); let response={}; let url = 'http://localhost:1904/ping'; let data = {id:1,title:'cool bean'}; let option = {}; async.series([ async function(call){ // -- POST-START -- const [biz_response,biz_data] = await Remote.post(url,data); Log.w('biz_response',biz_response); Log.w('biz_data',biz_data); // -- POST-END -- }, async function(call){ console.log('CONNECT-SUCCESS'); }, ], function(error, result){ console.log('CONNECT-DONE'); done(); }); }); });