diff options
Diffstat (limited to 'packages/astro/e2e/astro-component.test.js')
-rw-r--r-- | packages/astro/e2e/astro-component.test.js | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/packages/astro/e2e/astro-component.test.js b/packages/astro/e2e/astro-component.test.js index 8d6151f07..8ebbcd3a6 100644 --- a/packages/astro/e2e/astro-component.test.js +++ b/packages/astro/e2e/astro-component.test.js @@ -36,10 +36,7 @@ test.describe('Astro component HMR', () => { ); }); - // TODO: Re-enable this test on windows when #3424 is fixed - // https://github.com/withastro/astro/issues/3424 - const it = os.platform() === 'win32' ? test.skip : test; - it('hoisted scripts', async ({ page, astro }) => { + test('hoisted scripts', async ({ page, astro }) => { const initialLog = page.waitForEvent( 'console', (message) => message.text() === 'Hello, Astro!' @@ -60,4 +57,26 @@ test.describe('Astro component HMR', () => { await updatedLog; }); + + test('inline scripts', async ({ page, astro }) => { + const initialLog = page.waitForEvent( + 'console', + (message) => message.text() === 'Hello, inline Astro!' + ); + + await page.goto(astro.resolveUrl('/')); + await initialLog; + + const updatedLog = page.waitForEvent( + 'console', + (message) => message.text() === 'Hello, updated inline Astro!' + ); + + // Edit the inline script on the page + await astro.editFile('./src/pages/index.astro', (content) => + content.replace('Hello, inline Astro!', 'Hello, updated inline Astro!') + ); + + await updatedLog; + }); }); |