or run

npx @tessl/cli init
Log in

Version

Files

tile.json

task.mdevals/scenario-1/

File Download Progress Tracker

Build a command-line utility that simulates downloading files and displays real-time progress feedback to the user.

Requirements

The utility should:

  1. Accept a list of file names and their sizes (in MB) as command-line arguments
  2. Simulate downloading each file sequentially by waiting an appropriate amount of time
  3. Display a visual progress indicator that updates as each file downloads
  4. Show percentage completion for the overall download process
  5. Print a completion message when all files are downloaded

The progress display should update smoothly during downloads and show clear visual feedback to users about download progress.

Implementation

@generates

API

/**
 * Simulates downloading files with progress display
 * @param {Array<{name: string, size: number}>} files - Array of files with name and size in MB
 */
function downloadFiles(files);

module.exports = { downloadFiles };

Test Cases

  • Given files [{name: 'doc.pdf', size: 10}, {name: 'video.mp4', size: 50}], it completes the download simulation and displays progress updates @test
  • Given an empty file list [], it completes immediately without errors @test
  • Given a single file [{name: 'image.jpg', size: 5}], it shows progress from 0% to 100% @test

Dependencies { .dependencies }

cli { .dependency }

Provides command-line interface utilities including progress display functionality.

@satisfied-by