Sha256: 2804cda4010d309efe77d2a1a0422576b7bd3e9b6317ee2039c00a7e4d5aa88b
Contents?: true
Size: 995 Bytes
Versions: 1
Compression:
Stored size: 995 Bytes
Contents
import TestResolverApplicationTestCase from './test-resolver-application'; import Application from '@ember/application'; import { assign } from '@ember/polyfills'; import { Router } from '@ember/-internals/routing'; export default class AutobootApplicationTestCase extends TestResolverApplicationTestCase { createApplication(options, MyApplication = Application) { let myOptions = assign(this.applicationOptions, options); let application = (this.application = MyApplication.create(myOptions)); this.resolver = application.__registry__.resolver; if (this.resolver) { this.resolver.add('router:main', Router.extend(this.routerOptions)); } return application; } visit(url) { return this.application.boot().then(() => { return this.applicationInstance.visit(url); }); } get applicationInstance() { let { application } = this; if (!application) { return undefined; } return application.__deprecatedInstance__; } }
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/autoboot-application.js |