TestNew | Basic middleware creation and serving | Serves root index.html and nested files successfully |
TestWithOptions_Root | Serving from a subdirectory | Files from subdirectory accessible at root URL path |
TestWithOptions_MaxAge | Cache control headers | Cache-Control header set to specified max-age value |
TestWithOptions_NotFoundHandler | Custom not found handling | Custom handler invoked for missing files with JSON response |
TestHandler | Direct handler (non-middleware) | Serves files without middleware chain |
TestStatic | Static helper function | Serves files from specified subdirectory |
TestWithCaching | Caching helper function | Cache-Control header set correctly |
TestIndexFile | Index file serving | Root and subdirectory index files served automatically |
TestFallthrough | Middleware fallthrough | Non-existent files fall through to next handler |
TestSPA | Single-page application mode | Existing files served normally, unknown routes serve index.html |
TestSPA_DefaultIndex | SPA with default index | Empty index parameter defaults to “index.html” |
TestHandlerWithOptions | Handler with options | Options applied correctly in handler mode |
TestHandlerWithOptions_Root | Handler with custom root | Files served from specified root directory |
TestWithOptions_InvalidRoot | Invalid root directory handling | Falls back to original filesystem when root doesn’t exist |
TestWithOptions_PathWithoutLeadingSlash | Path normalization | Paths without leading slash handled correctly |
TestItoa | Integer to string conversion | Custom itoa function converts integers correctly |