Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
}