File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
packages/test-utils/src/mock-store/handlers Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -142,19 +142,13 @@ export const filesRoute = defineMockRouteHandler({
142142
143143 // If it's a file with _content, return the content
144144 if ( fileNode && "_content" in fileNode && typeof fileNode . _content === "string" ) {
145- let content = fileNode . _content ;
145+ const content = fileNode . _content ;
146146 const contentLength = new TextEncoder ( ) . encode ( content ) . length ;
147147 const headers : Record < string , string > = {
148148 "Content-Type" : "text/plain; charset=utf-8" ,
149149 [ UCD_STAT_TYPE_HEADER ] : "file" ,
150150 } ;
151151
152- // Check if the content ends with a newline; if not, add one for better terminal display
153- if ( ! content . endsWith ( "\n" ) ) {
154- headers [ "X-Content-Warning" ] = "Content did not end with a newline; added for display purposes." ;
155- content += "\n" ;
156- }
157-
158152 // Only include size headers for HEAD requests (buffered response)
159153 if ( isHeadRequest ) {
160154 headers [ "Content-Length" ] = `${ contentLength } ` ;
You can’t perform that action at this time.
0 commit comments