UNPKG

html-e2e

Version:

Tools for e2e functional testing through HTMl views

22 lines (19 loc) 417 B
const http = require('http') module.exports = function () { return Object.freeze({ get }) async function get (url) { return new Promise(function (resolve) { http.get(url, function (response) { let data = '' response.on('data', function (chunk) { data += chunk }) response.on('end', function () { resolve(data) }) }) }) } }