Skip to content

Commit 2c6c8f0

Browse files
committed
More tests
1 parent 047fda8 commit 2c6c8f0

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ In your app.js or app.ts, or wherever you configure your application
2929
+ './router': { default: Router },
3030
+ './services/manual': { default: SomeService },
3131
+ './services/manual-shorthand': SomeOtherService,
32+
+ './config/environment': { /* config here */ },
3233
+
3334
+ // now import.meta.glob just works
3435
+ ...import.meta.glob('./services/**/*', { eager: true }),

test-apps/vite-with-strict-app/app/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ if (macroCondition(isDevelopingApp())) {
1010
importSync('./deprecation-workflow');
1111
}
1212

13+
console.log(compatModules);
14+
1315
export default class App extends EmberApp {
1416
modules = {
1517
...compatToRFC1132('vite-with-strict-app', compatModules),

test-apps/vite-with-strict-app/tests/unit/services-test.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@ import { setupTest } from 'ember-qunit';
44
module('Services', function (hooks) {
55
setupTest(hooks);
66

7+
test('has the config', function (assert) {
8+
let entry = this.owner.resolveRegistration('config:environment');
9+
10+
assert.ok(entry);
11+
});
12+
13+
test('has the router', function (assert) {
14+
// eslint-disable-next-line ember/no-private-routing-service
15+
let entry = this.owner.lookup('router:main');
16+
17+
assert.ok(entry);
18+
});
19+
20+
test('has the application template', function (assert) {
21+
let entry = this.owner.hasRegistration('template:application');
22+
23+
assert.ok(entry);
24+
});
25+
726
test('has services from addons', function (assert) {
827
let pageTitle = this.owner.lookup('service:page-title');
928

0 commit comments

Comments
 (0)