File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11language : node_js
22node_js :
3- - " node"
4- sudo : required
5- script : " sudo node_modules/mocha/bin/mocha --exit"
3+ - " node"
Original file line number Diff line number Diff line change 1+ process . env . TEST = true
2+ process . env . PORT = 4443
3+ process . env . HTTP_PORT = 8080
4+
15const assert = require ( 'assert' )
26const childProcess = require ( 'child_process' ) ;
37const fs = require ( 'fs' ) ;
48const http = require ( 'http' )
59const https = require ( 'https' )
610const app = require ( '../index.js' )
711
8- process . env . TEST = true
9-
1012// run an external script located in the scriptPath
1113function runScript ( scriptPath , args = [ ] , background = false ) {
1214 return new Promise ( ( resolve , reject ) => {
@@ -29,12 +31,13 @@ async function sleep(ms = 0) {
2931function makeRequest ( path = "/" , secure = false ) {
3032 const agentOptions = {
3133 host : 'localhost' ,
32- port : ' 443' ,
34+ port : process . env . PORT || 443 ,
3335 path : '/' ,
3436 rejectUnauthorized : false
3537 }
3638 const options = {
3739 host : "localhost" ,
40+ port : process . env . HTTP_PORT || 80 ,
3841 path : path ,
3942 method : "GET" ,
4043 headers : { }
You can’t perform that action at this time.
0 commit comments