Skip to content

Commit 686e6ae

Browse files
committed
add test
1 parent 2732169 commit 686e6ae

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/kit/src/utils/filesystem.spec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,10 @@ test('ignores hooks.server folder when resolving hooks', () => {
105105

106106
expect(resolve_entry(source_dir + '/hooks')).null;
107107
});
108+
109+
test('ignores hooks folder that has no index file when resolving hooks', () => {
110+
write('hooks/not-index.js', '');
111+
write('hooks.js', '');
112+
113+
expect(resolve_entry(source_dir + '/hooks')).toBe(source_dir + '/hooks');
114+
});

0 commit comments

Comments
 (0)