diff --git a/app/router.js b/app/router.js index 9c8a972..1e53a1c 100644 --- a/app/router.js +++ b/app/router.js @@ -1,4 +1,4 @@ -import EmberRouter from '@ember/routing/router'; +import EmberRouter from '@embroider/router'; import config from 'site-books-ember/config/environment'; export default class Router extends EmberRouter { diff --git a/ember-cli-build.js b/ember-cli-build.js index 97d8dd1..e09c0e0 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -17,5 +17,6 @@ module.exports = function (defaults) { staticModifiers: true, staticComponents: true, staticEmberSource: true, + splitAtRoutes: ['livres', 'que-choisir'], }); }; diff --git a/package.json b/package.json index 9350d81..97ca8b3 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "@ember/test-helpers": "^3.3.0", "@embroider/compat": "^3.4.7", "@embroider/core": "^3.4.7", + "@embroider/router": "^2.1.8", "@embroider/util": "^1.13.0", "@embroider/webpack": "^3.2.3", "@glimmer/component": "^1.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f1add25..ff4ba08 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,6 +32,9 @@ devDependencies: '@embroider/core': specifier: ^3.4.7 version: 3.4.7 + '@embroider/router': + specifier: ^2.1.8 + version: 2.1.8(@embroider/core@3.4.7) '@embroider/util': specifier: ^1.13.0 version: 1.13.0(ember-source@5.8.0) @@ -1644,6 +1647,18 @@ packages: - supports-color dev: true + /@embroider/addon-shim@1.8.9: + resolution: {integrity: sha512-qyN64T1jMHZ99ihlk7VFHCWHYZHLE1DOdHi0J7lmn5waV1DoW7gD8JLi1i7FregzXtKhbDc7shyEmTmWPTs8MQ==} + engines: {node: 12.* || 14.* || >= 16} + dependencies: + '@embroider/shared-internals': 2.6.0(supports-color@8.1.1) + broccoli-funnel: 3.0.8 + common-ancestor-path: 1.0.1 + semver: 7.6.0 + transitivePeerDependencies: + - supports-color + dev: true + /@embroider/babel-loader-9@3.1.1(@embroider/core@3.4.7)(supports-color@8.1.1)(webpack@5.91.0): resolution: {integrity: sha512-8mIDRXvwntYIQc2JFVvGXEppHUJRhw+6aEzHtbCZDr4oOKw55IyY+RHzas3JILRq64owLA+Ox0yu6nkwL1ApRQ==} engines: {node: 12.* || 14.* || >= 16} @@ -1784,6 +1799,21 @@ packages: - supports-color dev: true + /@embroider/router@2.1.8(@embroider/core@3.4.7): + resolution: {integrity: sha512-Dvp8YdqAWT6T0yzBZfUe6SyaVNH7xoXBlrxF1LbqoF/Q2buNzDy9oAQ5tTnbX1x+5KOrM0ryOjfeF0GoqkfobA==} + peerDependencies: + '@embroider/core': ^2.0.0||^3.0.0 + peerDependenciesMeta: + '@embroider/core': + optional: true + dependencies: + '@ember/test-waiters': 3.1.0 + '@embroider/addon-shim': 1.8.9 + '@embroider/core': 3.4.7 + transitivePeerDependencies: + - supports-color + dev: true + /@embroider/shared-internals@2.6.0(supports-color@8.1.1): resolution: {integrity: sha512-A2BYQkhotdKOXuTaxvo9dqOIMbk+2LqFyqvfaaePkZcFJvtCkvTaD31/sSzqvRF6rdeBHjdMwU9Z2baPZ55fEQ==} engines: {node: 12.* || 14.* || >= 16} @@ -4672,6 +4702,10 @@ packages: engines: {node: '>= 12'} dev: true + /common-ancestor-path@1.0.1: + resolution: {integrity: sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==} + dev: true + /common-path-prefix@3.0.0: resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} dev: true diff --git a/tests/unit/controllers/livres-test.js b/tests/unit/controllers/livres-test.js index 1c097dd..a8b214d 100644 --- a/tests/unit/controllers/livres-test.js +++ b/tests/unit/controllers/livres-test.js @@ -1,10 +1,14 @@ import { module, test } from 'qunit'; import { setupTest } from 'site-books-ember/tests/helpers'; +import LivresRoute from 'site-books-ember/controllers/livres'; module('Unit | Controller | livres', function (hooks) { setupTest(hooks); - // TODO: Replace this with your real tests. + hooks.beforeEach(function () { + this.owner.register('controller:livres', LivresRoute); + }); + test('it exists', function (assert) { let controller = this.owner.lookup('controller:livres'); assert.ok(controller); diff --git a/tests/unit/controllers/que-choisir-test.js b/tests/unit/controllers/que-choisir-test.js index b64c32e..7cf23ca 100644 --- a/tests/unit/controllers/que-choisir-test.js +++ b/tests/unit/controllers/que-choisir-test.js @@ -1,10 +1,14 @@ import { module, test } from 'qunit'; import { setupTest } from 'site-books-ember/tests/helpers'; +import QueChoisirRoute from 'site-books-ember/controllers/que-choisir'; module('Unit | Controller | que-choisir', function (hooks) { setupTest(hooks); - // TODO: Replace this with your real tests. + hooks.beforeEach(function () { + this.owner.register('controller:que-choisir', QueChoisirRoute); + }); + test('it exists', function (assert) { let controller = this.owner.lookup('controller:que-choisir'); assert.ok(controller); diff --git a/tests/unit/routes/livres-test.js b/tests/unit/routes/livres-test.js index 7473e0e..bbe333d 100644 --- a/tests/unit/routes/livres-test.js +++ b/tests/unit/routes/livres-test.js @@ -1,9 +1,14 @@ import { module, test } from 'qunit'; import { setupTest } from 'site-books-ember/tests/helpers'; +import LivresRoute from 'site-books-ember/routes/livres'; module('Unit | Route | livres', function (hooks) { setupTest(hooks); + hooks.beforeEach(function () { + this.owner.register('route:livres', LivresRoute); + }); + test('it exists', function (assert) { let route = this.owner.lookup('route:livres'); assert.ok(route); diff --git a/tests/unit/routes/que-choisir-test.js b/tests/unit/routes/que-choisir-test.js index 3b695ef..3fe858a 100644 --- a/tests/unit/routes/que-choisir-test.js +++ b/tests/unit/routes/que-choisir-test.js @@ -1,9 +1,14 @@ import { module, test } from 'qunit'; import { setupTest } from 'site-books-ember/tests/helpers'; +import QueChoisirRoute from 'site-books-ember/routes/que-choisir'; module('Unit | Route | que-choisir', function (hooks) { setupTest(hooks); + hooks.beforeEach(function () { + this.owner.register('route:que-choisir', QueChoisirRoute); + }); + test('it exists', function (assert) { let route = this.owner.lookup('route:que-choisir'); assert.ok(route);