A calm place to write long-form, and publish it to the open social web. skypress.blog/
0

Configure Feed

Select the types of activity you want to include in your feed.

at trunk 738 B View raw
1import { readFileSync } from 'node:fs'; 2import { dirname, join } from 'node:path'; 3import { fileURLToPath } from 'node:url'; 4import { describe, expect, it } from 'vitest'; 5 6const here = dirname( fileURLToPath( import.meta.url ) ); 7const page = readFileSync( join( here, './404.astro' ), 'utf8' ); 8 9describe( 'global 404 page', () => { 10 it( 'is prerendered (static, no per-request data)', () => { 11 expect( page ).toMatch( /export const prerender = true/ ); 12 } ); 13 14 it( 'renders ErrorScene with the generic not-found copy', () => { 15 expect( page ).toMatch( /import ErrorScene from '[^']*components\/ErrorScene.astro'/ ); 16 expect( page ).toMatch( /errorScene\(\s*'not-found'\s*\)/ ); 17 expect( page ).toMatch( /<ErrorScene/ ); 18 } ); 19} );