diff --git a/__tests__/main.js b/__tests__/main.js index 888d7d3ebb1254a9cb25c416fd52352974e20f3c..9ba064d313cf46263af811a30d229eed2be4f14f 100644 --- a/__tests__/main.js +++ b/__tests__/main.js @@ -10,3 +10,16 @@ describe('Open example', () => { await expect(page).toMatchElement('a[href="https://www.iana.org/domains/example"]'); }); }); + +describe('Open local HTTP server', () => { + beforeAll(async () => { + await page.goto('http://127.0.0.1:4488'); + }); + it('has the correct page title', async () => { + const title = await page.title(); + expect(title).toBe('Index of /'); + }); + it('has the correct link', async () => { + await expect(page).toMatchElement('a[href="./jest.json"]'); + }); +});