function runTests() { apiPost('/test/run', {}) .then(data => showResult('test-result', data)) .catch(err => console.error(err)); }