Skip to content

Commit

Permalink
Add reproduction for ember-cli-fastboot#802 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeAstapov committed Dec 7, 2020
1 parent 4d14f1f commit 9013d62
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ export default class Router extends EmberRouter {
}

Router.map(function() {
this.route('route-a');
this.route('route-b');
});
11 changes: 11 additions & 0 deletions app/routes/route-a.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Route from '@ember/routing/route';

export default class RouteARoute extends Route {
model () {
console.log("Hi! I'm log message from RouteA.model");
}

redirect () {
this.transitionTo('route-b');
}
}
7 changes: 7 additions & 0 deletions app/routes/route-b.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Route from '@ember/routing/route';

export default class RouteBRoute extends Route {
model () {
console.log("Hi! I'm log message from RouteB.model");
}
}
3 changes: 3 additions & 0 deletions app/templates/route-a.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{outlet}}
{{log "Hi! I'm log message from RouteA template"}}
Hi! I'm RouteA
3 changes: 3 additions & 0 deletions app/templates/route-b.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{outlet}}
{{log "Hi! I'm log message from RouteB template"}}
Hi! I'm RouteB
11 changes: 11 additions & 0 deletions tests/unit/routes/route-a-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';

module('Unit | Route | route-a', function(hooks) {
setupTest(hooks);

test('it exists', function(assert) {
let route = this.owner.lookup('route:route-a');
assert.ok(route);
});
});
11 changes: 11 additions & 0 deletions tests/unit/routes/route-b-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';

module('Unit | Route | route-b', function(hooks) {
setupTest(hooks);

test('it exists', function(assert) {
let route = this.owner.lookup('route:route-b');
assert.ok(route);
});
});

0 comments on commit 9013d62

Please sign in to comment.