[minor] Formatting
Refactoring to expose configuration with a promise
Adapt test following last refactoring + remove console.log
- Switch to function expressions instead of function declarations
- Documentation of the API