Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Ensure app/foo/index.js can be looked up with foo:main" #590

Merged
merged 1 commit into from Aug 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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