diff --git a/.gitignore b/.gitignore index 2d25d27..11b627c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ coverage *.log tmp playwriter/src/assets/*.png +playwriter/src/assets/framer.html *-snapshot.txt diff --git a/playwriter/src/htmlrewrite.test.ts b/playwriter/src/htmlrewrite.test.ts index 1815fd0..31f38e1 100644 --- a/playwriter/src/htmlrewrite.test.ts +++ b/playwriter/src/htmlrewrite.test.ts @@ -3,15 +3,14 @@ import { readFileSync } from 'fs' import { formatHtmlForPrompt } from './htmlrewrite.js' test('formatHtmlForPrompt', async () => { - const res = await fetch('https://framer.com') - const html = await res.text() + const html = readFileSync(new URL('./assets/framer.html', import.meta.url), 'utf-8') const newHtml = await formatHtmlForPrompt({ html }) expect(newHtml).toMatchInlineSnapshot( ` "
-