How to use the ember-test-helpers/legacy-0-6-x/build-registry function in ember-test-helpers

To help you get started, we’ve selected a few ember-test-helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github emberjs / ember-test-helpers / addon-test-support / @ember / test-helpers / build-owner.ts View on Github external
export default function buildOwner(application, resolver) {
  if (application) {
    return application.boot().then(app => app.buildInstance().boot());
  }

  if (!resolver) {
    throw new Error(
      'You must set up the ember-test-helpers environment with either `setResolver` or `setApplication` before running any tests.'
    );
  }

  let { owner } = legacyBuildRegistry(resolver);
  return Promise.resolve(owner);
}