diff --git a/test/index.js b/test/index.js index 5288147ddf..be0f944036 100644 --- a/test/index.js +++ b/test/index.js @@ -2,6 +2,7 @@ const util = require('../helpers/util') const axios = require('axios') const https = require('https') +const verbose = true const errorLog = 'error.log' const config = { timeout: 60000, @@ -14,13 +15,13 @@ let stats = { failures: 0 } -const http = axios.create({ +const instance = axios.create({ timeout: config.timeout, httpsAgent: new https.Agent({ rejectUnauthorized: false }) }) -http.defaults.headers.common["User-Agent"] = "VLC/2.2.4 LibVLC/2.2.4" +instance.defaults.headers.common["User-Agent"] = "VLC/2.2.4 LibVLC/2.2.4" async function test() { @@ -52,7 +53,11 @@ async function test() { try { - await http.get(item.url) + if(verbose) { + console.log(`Checking '${item.url}'...`) + } + + await instance.get(item.url) continue