<commit_before>
frameworks = {}

function isMainApp() {
  return !process.env.FRAMEWORK;
}

function shouldRun(frameworkName) {
  return process.env.FRAMEWORK === frameworkName
}

if (process.env.VELOCITY !== '0') {

  // Server Integration
  if (process.env.JASMINE_SERVER_INTEGRATION !== '0') {
    frameworks.serverIntegration = new ServerIntegrationTestFramework()

    if (isMainApp()) {
      frameworks.serverIntegration.registerWithVelocity()
      frameworks.serverIntegration.startMirror()
    }

    if (shouldRun('jasmine-server-integration')) {
      Meteor.startup(function () {
        frameworks.serverIntegration.start()
      })
    }
  }


  // Client Integration
  if (process.env.JASMINE_CLIENT_INTEGRATION !== '0') {
    frameworks.clientIntegration = new ClientIntegrationTestFramework()

    if (isMainApp()) {
      frameworks.clientIntegration.registerWithVelocity()
      frameworks.clientIntegration.startMirror()
    }
  }


  if (process.env.JASMINE_CLIENT_UNIT !== '0') {
    frameworks.clientUnit = new ClientUnitTestFramework()
  }

  if (process.env.JASMINE_SERVER_UNIT !== '0') {
    frameworks.serverUnit = new ServerUnitTestFramework()
  }

  if (!process.env.IS_MIRROR) {
    if (process.env.JASMINE_CLIENT_UNIT !== '0') {
      frameworks.clientUnit.registerWithVelocity()
    }

    if (process.env.JASMINE_SERVER_UNIT !== '0') {
      frameworks.serverUnit.registerWithVelocity()
    }

    Velocity.startup(function () {
      if (process.env.JASMINE_CLIENT_UNIT !== '0') {
        frameworks.clientUnit.start()
      }
      if (process.env.JASMINE_SERVER_UNIT !== '0') {
        frameworks.serverUnit.start()
      }
    })
  }
}<commit_msg>Completes restructuring of framework registration<commit_after>/* globals frameworks: true */

frameworks = {}

function isMainApp() {
  return !process.env.FRAMEWORK;
}

function shouldRun(frameworkName) {
  return process.env.FRAMEWORK === frameworkName
}

if (process.env.VELOCITY !== '0') {

  // Server Integration
  if (process.env.JASMINE_SERVER_INTEGRATION !== '0') {
    frameworks.serverIntegration = new ServerIntegrationTestFramework()

    if (isMainApp()) {
      frameworks.serverIntegration.registerWithVelocity()
      frameworks.serverIntegration.startMirror()
    }

    if (shouldRun('jasmine-server-integration')) {
      Meteor.startup(function () {
        frameworks.serverIntegration.start()
      })
    }
  }


  // Client Integration
  if (process.env.JASMINE_CLIENT_INTEGRATION !== '0') {
    frameworks.clientIntegration = new ClientIntegrationTestFramework()

    if (isMainApp()) {
      frameworks.clientIntegration.registerWithVelocity()
      frameworks.clientIntegration.startMirror()
    }
  }


  // Client Unit
  if (process.env.JASMINE_CLIENT_UNIT !== '0') {
    frameworks.clientUnit = new ClientUnitTestFramework()

    if (isMainApp()) {
      frameworks.clientUnit.registerWithVelocity()
      Velocity.startup(function () {
        frameworks.clientUnit.start()
      })
    }
  }


  // Client Server
  if (process.env.JASMINE_SERVER_UNIT !== '0') {
    frameworks.serverUnit = new ServerUnitTestFramework()

    if (isMainApp()) {
      frameworks.serverUnit.registerWithVelocity()
      Velocity.startup(function () {
        frameworks.serverUnit.start()
      })
    }
  }

}
{'fraction_non_alphanumeric': 0.12658610271903323, 'fraction_numerical': 0.004229607250755287, 'mean_word_length': 3.3796296296296298, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '5738459', 'n_tokens_mistral': 1070, 'n_tokens_neox': 1027, 'n_words': 148}