{"size": 551, "ext": "js", "max_stars_repo_path": "test/helper.js", "max_stars_repo_name": "tilfin/flatout", "max_stars_repo_stars_event_min_datetime": "2019-04-06T10:22:50.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-25T01:58:47.000Z", "max_issues_repo_path": "test/helper.js", "max_issues_repo_name": "tilfin/flatout", "max_issues_repo_issues_event_min_datetime": "2019-09-30T16:46:14.000Z", "max_issues_repo_issues_event_max_datetime": "2019-09-30T16:46:14.000Z", "max_forks_repo_path": "test/helper.js", "max_forks_repo_name": "tilfin/flatout", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 22.04, "max_line_length": 90, "alphanum_fraction": 0.664246824}
const util = require('util');
const puppeteer = require('puppeteer')

const app = require('./server')
let server, browser;

before(async () => {
  const port = process.env.PORT || 18888;
  server = app.listen(port)
  global.__ENDPOINT__ = `http://localhost:${port}`;

  browser = await puppeteer.launch({ args: ['--no-sandbox', '--disable-setuid-sandbox'] })
  global.__BROWSER__ = browser;
})

after(async () => {
  await browser.close()
  server.close()
})

module.exports = {
  sleep: util.promisify(setTimeout),
  assert: require('chai').assert
}
