Sha256: a1355f97991185fb5ccb2fd0f0e5f377a07a3eb3cc50ee0c35bb0c8d8b04e8ba
Contents?: true
Size: 1.05 KB
Versions: 1
Compression:
Stored size: 1.05 KB
Contents
import TestResolverApplicationTestCase from './test-resolver-application'; import Application from '@ember/application'; import { Router } from '@ember/-internals/routing'; import { assign } from '@ember/polyfills'; export default class ApplicationTestCase extends TestResolverApplicationTestCase { constructor() { super(...arguments); let { applicationOptions } = this; this.application = this.runTask(this.createApplication.bind(this, applicationOptions)); this.resolver = this.application.__registry__.resolver; if (this.resolver) { this.resolver.add('router:main', Router.extend(this.routerOptions)); } } createApplication(myOptions = {}, MyApplication = Application) { return MyApplication.create(myOptions); } get applicationOptions() { return assign(super.applicationOptions, { autoboot: false, }); } get appRouter() { return this.applicationInstance.lookup('router:main'); } transitionTo() { return this.runTask(() => { return this.appRouter.transitionTo(...arguments); }); } }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
discourse-ember-source-3.6.0.0 | dist/es/internal-test-helpers/lib/test-cases/application.js |