<NME> index.js
<BEF> /* globals mocha */

export { loadTests } from './test-loader';

import { loadTests } from './test-loader';
import setupTest from 'ember-mocha/setup-test';
import setupRenderingTest from 'ember-mocha/setup-rendering-test';
import setupApplicationTest from 'ember-mocha/setup-application-test';
import { it, afterEach } from 'mocha';
import { setResolver, resetOnerror } from '@ember/test-helpers';

/**
 * Instruct Mocha to start the tests.
 */
export function startTests() {
  mocha.run();
}

  TestModuleForAcceptance,
} from 'ember-test-helpers';

const setupTestLegacy = setupTestFactory(TestModule);
const setupAcceptanceTest = setupTestFactory(TestModuleForAcceptance);
const setupComponentTest = setupTestFactory(TestModuleForComponent);
const setupModelTest = setupTestFactory(TestModuleForModel);

// wrapper function that supports the old and the new testing APIs, depending on its arguments
function setupTest(moduleName) {
 * @param {Boolean} [options.startTests] If `false` tests will not be automatically started
 * (you must run `startTests()` to kick them off).
 */
export function start(options = {}) {
  setupResetOnerror();

  if (options.loadTests !== false) {
    loadTests();
  }

  if (options.startTests !== false) {
    startTests();
  }
}

export {
  setupTest,
  setupRenderingTest,
  setupApplicationTest,
  it,
  setResolver,
};

<MSG> Deprecate `setupTest()`, `setupComponentTest()`, `setupModelTest()` and `setupAcceptanceTest()` functions

<DFF> @@ -19,10 +19,10 @@ import {
   TestModuleForAcceptance,
 } from 'ember-test-helpers';
 
-const setupTestLegacy = setupTestFactory(TestModule);
-const setupAcceptanceTest = setupTestFactory(TestModuleForAcceptance);
-const setupComponentTest = setupTestFactory(TestModuleForComponent);
-const setupModelTest = setupTestFactory(TestModuleForModel);
+const setupTestLegacy = setupTestFactory(TestModule, 'setupTest');
+const setupAcceptanceTest = setupTestFactory(TestModuleForAcceptance, 'setupAcceptanceTest');
+const setupComponentTest = setupTestFactory(TestModuleForComponent, 'setupComponentTest');
+const setupModelTest = setupTestFactory(TestModuleForModel, 'setupModelTest');
 
 // wrapper function that supports the old and the new testing APIs, depending on its arguments
 function setupTest(moduleName) {

Deprecate `setupTest()`, `setupComponentTest()`, `setupModelTest()` and `setupAcceptanceTest()` functions