Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issues with normalization in primary (non-fallback) registry.
When Ember internally builds a registry via `Ember.Application.buildRegistry` it aliases `registry.normalizeFullName` to `resolver.normalize` and this becomes the fallback registry. Then Ember creates the primary registry (in `ApplicationInstance`'s constructor) and provides the primary registry's resolver (which is `function() { }` to allow for registration overrides) with the original (aka from the `fallback` registry) `normalizeFullName`. Unfortunately, when this was initially implemented in ember-test-helpers this nuance was missed and we subsequently had many issues reported for things that the normalize method would have fixed (specifically converting `service:fooBar` to `service:foo-bar` before looking up). It would be better IMO if `Ember.Registry` could be made aware of this resolver shenanigans, and provide a hook that can be called to "wrapFallbackRegistry" or somesuch so that ember-test-helpers (and `ApplicationInstance` in Ember) do not need to know about these "magic" methods.
- Loading branch information