From d9a262196ce5e097d2a255ba9d1a3f69bb1a3e59 Mon Sep 17 00:00:00 2001 From: Kerboul Date: Wed, 15 Jan 2025 15:17:30 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20d'un=20test=20pour=20la=20cr=C3=A9ation?= =?UTF-8?q?=20et=20la=20suppression=20de=20projets=20dans=20dbTester?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/dbTester.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/dbTester.js b/test/dbTester.js index 4c37eaa..e395339 100644 --- a/test/dbTester.js +++ b/test/dbTester.js @@ -7,6 +7,21 @@ async function printProjects() { console.log('Projects:', projects); } +async function testCreateDestroyProject() { + const project = await databaseUtils.addProject('Test project', 'This is a test project'); + console.log('Project added:', project); + await printProjects(); + await databaseUtils.deleteProject(project.id); + await printProjects(); +} + +try { + testCreateDestroyProject(); +} catch (error) { + console.error('Error:', error); +} + + try { printProjects(); } catch (error) {