Skip to content

Commit 44c15b8

Browse files
Merge pull request #14 from ember-cli/ensure-registration-of-weird-stuff-works
Add test for non-standard registrations
2 parents 4977b3c + 69cf1d3 commit 44c15b8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/registry-test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,19 @@ module('Registry', function (hooks) {
3535
assert.ok(metaGlob);
3636
assert.ok(metaGlob.weDidIt);
3737
});
38+
39+
test('registered stuff can be looked up', function (assert) {
40+
class Foo {
41+
static create() {
42+
return new this();
43+
}
44+
45+
two = 2;
46+
}
47+
this.owner.register('not-standard:main', Foo);
48+
49+
const value = this.owner.lookup('not-standard:main') as Foo;
50+
51+
assert.strictEqual(value.two, 2);
52+
});
3853
});

0 commit comments

Comments
 (0)