docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a simple status banner generator for terminal applications that displays status messages with colored backgrounds.
Create a module that exports a single function createStatusBanner(status, message) that generates formatted terminal output with appropriate background colors based on the status type.
The function should:
status string parameter (one of: "error", "success", "warning", "info")message string parameter containing the text to displaycreateStatusBanner("error", "Failed to connect") returns the message with a red background @testcreateStatusBanner("success", "Operation completed") returns the message with a green background @testcreateStatusBanner("warning", "Low disk space") returns the message with a yellow background @testcreateStatusBanner("info", "Loading data") returns the message with a cyan background @testcreateStatusBanner("unknown", "Some message") returns the message without any background color @test/**
* Creates a status banner with colored background based on status type
*
* @param {string} status - The status type: "error", "success", "warning", or "info"
* @param {string} message - The message to display
* @returns {string} The formatted message with appropriate background color
*/
function createStatusBanner(status, message) {
// IMPLEMENTATION HERE
}
module.exports = { createStatusBanner };Provides terminal color formatting support with background color functions.