add tests i guess

This commit is contained in:
Gabriella Casap
2025-09-26 14:56:28 +01:00
parent 04434f176b
commit f2e24ede76

View File

@@ -27,7 +27,7 @@
local downloadShitBtn = gurt.select('#download-shit')
local downloadTextBtn = gurt.select('#download-text')
local downloadJsonBtn = gurt.select('#download-json')
local downloadPeakBtn = gurt.select('#download-peak')
trace.log('Download API demo script started.')
local logMessages = {}
@@ -74,6 +74,13 @@
addLog("⚠️ Warning: This is a large file (~5GB)!")
end)
-- no ai slop btw
downloadPeakBtn:on('click', function()
-- i expect you to host this yourself
local downloadId = gurt.download("gurt://127.0.0.1", "peakshit.iso")
addLog(`started your peak download {downloadId}`)
end)
-- Clear log button
clearLogBtn:on('click', function()
logMessages = {}
@@ -107,6 +114,7 @@
</div>
<div style="button-group mb-4">
<button id="download-shit" style="special-button">💿 Download Shit (Ubuntu ISO)</button>
<button id="download-peak" style="special-button">Download shit over gurt :tada:</button>
</div>
<div style="code-block">
@@ -128,6 +136,10 @@ end)
gurt.select("#download-shit"):on("click", function()
local downloadId = gurt.download("https://releases.ubuntu.com/24.04.3/ubuntu-24.04.3-desktop-amd64.iso", "linux.iso")
end)
gurt.select("#download-peak"):on("click", function()
local downloadId = gurt.download("gurt://127.0.0.1", "peakshit.iso")
end)
</div>
</div>
@@ -146,6 +158,7 @@ end)
<li><strong>Return Value:</strong> Returns a unique download ID for tracking</li>
<li><strong>File Types:</strong> Supports any file type (images, text, binary, etc.)</li>
<li><strong>Large Files:</strong> Can handle large downloads like OS images</li>
<li><strong>GURT Protocol:</strong> Supports downloading over the gurt protocol</li>
</ul>
<h3 style="text-[#0369a1] font-semibold mt-4 mb-2">Test Cases:</h3>
<ul style="text-[#075985] space-y-1 text-sm">