File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,36 @@ describe("staticalize", () => {
187187
188188 await expect ( exists ( "test/dist/assets/styles.css" ) ) . resolves . toEqual ( true ) ;
189189 } ) ;
190+
191+ it . skip ( "replaces references to absolute assets that have the sae host that we're scraping" , async ( ) => {
192+ const html = `
193+ <html>
194+ <head>
195+ <link rel="canonical" href="${ host } "/>
196+ <link rel="alternate" href="${ host } alt"/>
197+ </head>
198+ </html>
199+ `
200+ app . get ( "/" , ( c ) =>
201+ c . html ( html ) )
202+ . get ( "/alt" , ( c ) => c . html ( html ) )
203+ . get ( ...sitemap ( [ "/" ] ) ) ;
204+
205+ await staticalize ( {
206+ base : new URL ( "https://fs.com" ) ,
207+ host,
208+ dir : "test/dist" ,
209+ } ) ;
210+
211+ await expect ( content ( "test/dist/index.html" ) ) . resolves . toEqual ( `
212+ <html>
213+ <head>
214+ <link rel="canonical" href="https://fs.com/"/>
215+ <link rel="alternate" href="https://fs.com/alt"/>
216+ </head>
217+ </html>
218+ ` ) ;
219+ } ) ;
190220} ) ;
191221
192222async function content ( path : string ) : Promise < string > {
You can’t perform that action at this time.
0 commit comments