From 152f4ee508c063d69f9c31c44b9bad397f98d082 Mon Sep 17 00:00:00 2001 From: Kerboul Date: Wed, 12 Feb 2025 07:57:41 +0000 Subject: [PATCH] =?UTF-8?q?Commenter=20le=20code=20de=20test=20dans=20test?= =?UTF-8?q?er.js=20pour=20d=C3=A9sactiver=20les=20fonctions=20de=20cr?= =?UTF-8?q?=C3=A9ation=20et=20de=20suppression=20de=20dossiers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/tester.js | 76 +++++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/test/tester.js b/test/tester.js index 3b7c681..2248f39 100644 --- a/test/tester.js +++ b/test/tester.js @@ -5,47 +5,47 @@ const path = require('path'); // console.log('Testing database functions...'); -try { - storageManager.createFolder('test_folder'); - console.log('1 - Folder created'); - storageManager.deleteFolder('test_folder'); - console.log('2 - Folder deleted'); -} catch (error) { - console.error('Error testing database functions:', error); -} - -function getSmileImage() { - return path.join(__dirname, '../sample/smile.png'); -} - -//test de lancement d'une création de vidéo sur le projet 1 -// videoManager.createVideo(1).then(res => { -// console.log('3 - Video created:', res); -// }).catch(err => { -// console.error('Error creating video:', err); -// }); -// async function run() { -// var Path = await measureManager.getPathFromIds(1, 1); -// console.log(Path); +// try { +// storageManager.createFolder('test_folder'); +// console.log('1 - Folder created'); +// storageManager.deleteFolder('test_folder'); +// console.log('2 - Folder deleted'); +// } catch (error) { +// console.error('Error testing database functions:', error); // } -// run().catch(err => { +// function getSmileImage() { +// return path.join(__dirname, '../sample/smile.png'); +// } + +// //test de lancement d'une création de vidéo sur le projet 1 +// // videoManager.createVideo(1).then(res => { +// // console.log('3 - Video created:', res); +// // }).catch(err => { +// // console.error('Error creating video:', err); +// // }); +// // async function run() { +// // var Path = await measureManager.getPathFromIds(1, 1); +// // console.log(Path); +// // } + +// // run().catch(err => { +// // console.error('Error:', err); +// // }); + +// var pathList = [ +// 'storage/1/images/1.jpg', +// 'storage/1/images/10.jpg', +// 'storage/1/images/20.jpg', +// 'storage/1/images/30.jpg', +// ]; +// videoManager.createVideoWithList(1, pathList).then(res => { +// console.log('3 - Video created:', res); +// return storageManager.deleteFile(res); +// }).then(res => { +// console.log('4 - Video deleted:', res); +// }).catch(err => { // console.error('Error:', err); // }); -var pathList = [ - 'storage/1/images/1.jpg', - 'storage/1/images/10.jpg', - 'storage/1/images/20.jpg', - 'storage/1/images/30.jpg', -]; -videoManager.createVideoWithList(1, pathList).then(res => { - console.log('3 - Video created:', res); - return storageManager.deleteFile(res); -}).then(res => { - console.log('4 - Video deleted:', res); -}).catch(err => { - console.error('Error:', err); -}); - exports.getSmileImage = getSmileImage; \ No newline at end of file