Skip to content

Commit

Permalink
Merge pull request #590 from ember-cli/revert-index-fallback-for-main
Browse files Browse the repository at this point in the history
Revert "Ensure app/foo/index.js can be looked up with foo:main"
  • Loading branch information
rwjblue committed Aug 8, 2020
2 parents 5c60106 + d263106 commit 8aca08e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion addon/resolvers/classic/index.js
Expand Up @@ -19,7 +19,7 @@ export class ModuleRegistry {
return Object.keys(this._entries);
}
has(moduleName) {
return require.has(moduleName);
return moduleName in this._entries;
}
get(moduleName) {
return require(moduleName);
Expand Down
11 changes: 0 additions & 11 deletions tests/unit/resolvers/classic/basic-test.js
Expand Up @@ -386,17 +386,6 @@ test("store:main is looked up as prefix/store", function(assert) {
resolver.resolve('store:main');
});

test("store:main is looked up as prefix/store/index.js", function(assert) {
assert.expect(1);

define('appkit/store/index', [], function(){
assert.ok(true, 'store:main was looked up');
return 'whatever';
});

resolver.resolve('store:main');
});

test("store:posts as prefix/stores/post", function(assert) {
assert.expect(1);

Expand Down

0 comments on commit 8aca08e

Please sign in to comment.