From aca18d09f904892e7da24bdffe3571cf33b64f5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFs=20Poujade?= <lois.poujade@tetras-libre.fr>
Date: Mon, 28 Nov 2022 15:31:59 +0100
Subject: [PATCH] test again local HTTP server

---
 __tests__/main.js | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/__tests__/main.js b/__tests__/main.js
index 888d7d3..9ba064d 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"]');
+  });
+});
-- 
GitLab