Skip to content

Commit 1a6a182

Browse files
authored
bin/dev-server: simplify URL logging (#8772)
1 parent c89f407 commit 1a6a182

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

bin/dev-server.js

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,11 @@ function startServers(callback) {
105105
readyCallback = callback;
106106
http_server.createServer().listen(HTTP_PORT, function () {
107107
var testRoot = 'http://127.0.0.1:' + HTTP_PORT;
108-
var query = '';
109-
Object.keys(queryParams).forEach(function (key) {
110-
query += (query ? '&' : '?');
111-
query += key + '=' + encodeURIComponent(queryParams[key]);
112-
});
113-
console.log('Integration tests: ' + testRoot +
114-
'/tests/integration/' + query);
115-
console.log('Map/reduce tests: ' + testRoot +
116-
'/tests/mapreduce' + query);
117-
console.log('pouchdb-find tests: ' + testRoot +
118-
'/tests/find/' + query);
119-
console.log('Performance tests: ' + testRoot +
120-
'/tests/performance/' + query);
108+
const query = new URLSearchParams(queryParams);
109+
console.log(`Integration tests: ${testRoot}/tests/integration/?${query}`);
110+
console.log(`Map/reduce tests: ${testRoot}/tests/mapreduce/?${query}`);
111+
console.log(`pouchdb-find tests: ${testRoot}/tests/find/?${query}`);
112+
console.log(`Performance tests: ${testRoot}/tests/performance/?${query}`);
121113
serversStarted = true;
122114
checkReady();
123115
});

0 commit comments

Comments
 (0)