<commit_before>"use strict";
/*eslint-disable max-statements*/

/**
 * Base server unit test initialization / global before/after's.
 *
 * This file has should be included in any test run, filtered or not.
 */
// Set test environment
process.env.NODE_ENV = process.env.NODE_ENV || "test-func";

// ----------------------------------------------------------------------------
// Selenium (Webdriverio/Rowdy) initialization
// ----------------------------------------------------------------------------
// **Note** Can stash adapter, but not `adapter.client` because it is a lazy
// getter that relies on the global `before|beforeEach` setup.
var adapter = global.adapter;
var ELEM_WAIT = 200; // Global wait.

adapter.before();
before(function (done) {
  adapter.client
    // Set timeout for waiting on elements.
    .timeoutsImplicitWait(ELEM_WAIT)
    .call(done);
});

adapter.beforeEach();
adapter.afterEach();
adapter.after();

// ----------------------------------------------------------------------------
// Globals and dev. server initialization.
// ----------------------------------------------------------------------------
var APP_PORT = process.env.TEST_FUNC_PORT || 3030;
var APP_HOST = process.env.TEST_FUNC_HOST || "127.0.0.1";
var httpServer = require("http-server");
var server;

// ----------------------------------------------------------------------------
// Globals
// ----------------------------------------------------------------------------
before(function () {
  // Export global base server URL for tests to hit.
  global.TEST_FUNC_BASE_URL = process.env.TEST_FUNC_BASE_URL ||
    "http://" + APP_HOST + ":" + APP_PORT + "/";
});

// ----------------------------------------------------------------------------
// App server
// ----------------------------------------------------------------------------
before(function (done) {
  server = httpServer.createServer();
  server.listen(APP_PORT, APP_HOST, done);
});

after(function (done) {
  if (!(server && server.server)) { return done(); }
  // `http-server` doesn't pass the close callback, so we hack into the
  // underlying implementation. Sigh.
  server.server.close(done);
});
<commit_msg>Bump up timeoutsImplicitWait for RJS dev element timeouts.<commit_after>"use strict";
/*eslint-disable max-statements*/

/**
 * Base server unit test initialization / global before/after's.
 *
 * This file has should be included in any test run, filtered or not.
 */
// Set test environment
process.env.NODE_ENV = process.env.NODE_ENV || "test-func";

// ----------------------------------------------------------------------------
// Selenium (Webdriverio/Rowdy) initialization
// ----------------------------------------------------------------------------
// **Note** Can stash adapter, but not `adapter.client` because it is a lazy
// getter that relies on the global `before|beforeEach` setup.
var adapter = global.adapter;
var ELEM_WAIT = 500; // Global wait.

adapter.before();
before(function (done) {
  adapter.client
    // Set timeout for waiting on elements.
    .timeoutsImplicitWait(ELEM_WAIT)
    .call(done);
});

adapter.beforeEach();
adapter.afterEach();
adapter.after();

// ----------------------------------------------------------------------------
// Globals and dev. server initialization.
// ----------------------------------------------------------------------------
var APP_PORT = process.env.TEST_FUNC_PORT || 3030;
var APP_HOST = process.env.TEST_FUNC_HOST || "127.0.0.1";
var httpServer = require("http-server");
var server;

// ----------------------------------------------------------------------------
// Globals
// ----------------------------------------------------------------------------
before(function () {
  // Export global base server URL for tests to hit.
  global.TEST_FUNC_BASE_URL = process.env.TEST_FUNC_BASE_URL ||
    "http://" + APP_HOST + ":" + APP_PORT + "/";
});

// ----------------------------------------------------------------------------
// App server
// ----------------------------------------------------------------------------
before(function (done) {
  server = httpServer.createServer();
  server.listen(APP_PORT, APP_HOST, done);
});

after(function (done) {
  if (!(server && server.server)) { return done(); }
  // `http-server` doesn't pass the close callback, so we hack into the
  // underlying implementation. Sigh.
  server.server.close(done);
});

{'fraction_non_alphanumeric': 0.38388195232690125, 'fraction_numerical': 0.005902383654937571, 'mean_word_length': 1.3031887088342917, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5080942', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1022, 'n_words': 289}