Ajout d'un test pour la création et la suppression de projets dans dbTester
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user