@@ -51,6 +51,14 @@ describe('Server', () => {
51
51
listen = listenShorthand ( done ) ;
52
52
// Hack to add a mock HMR json file to the in-memory filesystem.
53
53
instance . fileSystem . writeFileSync ( '/123a123412.hot-update.json' , '["hi"]' ) ;
54
+
55
+ // Add a nested directory and index.html inside
56
+ instance . fileSystem . mkdirSync ( '/reference' ) ;
57
+ instance . fileSystem . mkdirSync ( '/reference/mono-v6.x.x' ) ;
58
+ instance . fileSystem . writeFileSync (
59
+ '/reference/mono-v6.x.x/index.html' ,
60
+ 'My Index.'
61
+ ) ;
54
62
} ) ;
55
63
56
64
after ( close ) ;
@@ -103,6 +111,14 @@ describe('Server', () => {
103
111
. expect ( 200 , / M y I n d e x \. / , done ) ;
104
112
} ) ;
105
113
114
+ it ( 'request to subdirectory without trailing slash' , ( done ) => {
115
+ request ( app )
116
+ . get ( '/public/reference/mono-v6.x.x' )
117
+ . expect ( 'Content-Type' , 'text/html; charset=UTF-8' )
118
+ . expect ( 'Content-Length' , '9' )
119
+ . expect ( 200 , / M y I n d e x \. / , done ) ;
120
+ } ) ;
121
+
106
122
it ( 'invalid range header' , ( done ) => {
107
123
request ( app ) . get ( '/public/svg.svg' )
108
124
. set ( 'Range' , 'bytes=6000-' )
0 commit comments