@@ -176,7 +176,7 @@ test.describe("SPA Mode", () => {
176
176
} ) ;
177
177
} ) ;
178
178
179
- test ( "prepends DOCTYPE to <html> documents if not present " , async ( ) => {
179
+ test ( "prepends DOCTYPE to HTML in the default entry.server.tsx " , async ( ) => {
180
180
let fixture = await createFixture ( {
181
181
compiler : "vite" ,
182
182
spaMode : true ,
@@ -222,48 +222,6 @@ test.describe("SPA Mode", () => {
222
222
expect ( await res . text ( ) ) . toMatch ( / ^ < ! D O C T Y P E h t m l > \n < h t m l l a n g = " e n " > / ) ;
223
223
} ) ;
224
224
225
- test ( "does not prepend DOCTYPE if user is not hydrating the document" , async ( ) => {
226
- let fixture = await createFixture ( {
227
- compiler : "vite" ,
228
- spaMode : true ,
229
- files : {
230
- "vite.config.ts" : js `
231
- import { defineConfig } from "vite";
232
- import { vitePlugin as remix } from "@remix-run/dev";
233
-
234
- export default defineConfig({
235
- plugins: [remix({ ssr: false })],
236
- });
237
- ` ,
238
- "app/root.tsx" : js `
239
- import { Outlet, Scripts } from "@remix-run/react";
240
-
241
- export default function Root() {
242
- return (
243
- <div>
244
- <h1 data-root>Root</h1>
245
- <Scripts />
246
- </div>
247
- );
248
- }
249
-
250
- export function HydrateFallback() {
251
- return (
252
- <div>
253
- <h1>Loading SPA...</h1>
254
- <Scripts />
255
- </div>
256
- );
257
- }
258
- ` ,
259
- } ,
260
- } ) ;
261
- let res = await fixture . requestDocument ( "/" ) ;
262
- let html = await res . text ( ) ;
263
- expect ( html ) . toMatch ( / ^ < d i v > / ) ;
264
- expect ( html ) . not . toMatch ( / < ! D O C T Y P E h t m l > / ) ;
265
- } ) ;
266
-
267
225
test ( "works when combined with a basename" , async ( { page } ) => {
268
226
fixture = await createFixture ( {
269
227
compiler : "vite" ,
@@ -363,7 +321,7 @@ test.describe("SPA Mode", () => {
363
321
<title>Not from Remix!</title>
364
322
</head>
365
323
<body>
366
- <div id="app"><!-- Remix- SPA--></div>
324
+ <div id="app"><!-- Remix SPA --></div>
367
325
</body>
368
326
</html>
369
327
` ,
@@ -406,7 +364,7 @@ test.describe("SPA Mode", () => {
406
364
);
407
365
408
366
const html = shellHtml.replace(
409
- "<!-- Remix- SPA-->",
367
+ "<!-- Remix SPA -->",
410
368
appHtml
411
369
);
412
370
0 commit comments