Skip to content

Commit

Permalink
feat: make the test passes more visually visible
Browse files Browse the repository at this point in the history
  • Loading branch information
2color committed Jul 30, 2024
1 parent 20de1dc commit d6e994f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,15 @@ <h2 class="f4">What does it mean if I get an error?</h2>
if (respObj.ConnectionError !== "") {
outText += "❌ Could not connect to multiaddr: " + respObj.ConnectionError + "\n"
} else {
outText += " Successfully connected to multiaddr\n"
outText += " Successfully connected to multiaddr\n"
}

if (ma.indexOf("/p2p/") === 0 && ma.lastIndexOf("/") === 4) {
// only peer id passed with /p2p/PeerID
if (Object.keys(respObj.PeerFoundInDHT).length === 0) {
outText += "❌ Could not find any multiaddrs in the dht\n"
} else {
outText += " Found multiaddrs advertised in the DHT:\n"
outText += " Found multiaddrs advertised in the DHT:\n"
for (const key in respObj.PeerFoundInDHT) {
outText += "\t" + key + "\n"
}
Expand All @@ -195,7 +195,7 @@ <h2 class="f4">What does it mean if I get an error?</h2>
for (const key in respObj.PeerFoundInDHT) {
if (key === addrPart) {
foundAddr = true
outText += " Found multiaddr with " + respObj.PeerFoundInDHT[key] + " dht peers\n"
outText += " Found multiaddr with " + respObj.PeerFoundInDHT[key] + " dht peers\n"
break
}
}
Expand All @@ -208,7 +208,7 @@ <h2 class="f4">What does it mean if I get an error?</h2>
}

if (respObj.CidInDHT === true) {
outText += " Found multihash advertised in the dht\n"
outText += " Found multihash advertised in the dht\n"
} else {
outText += "❌ Could not find the multihash in the dht\n"
}
Expand All @@ -218,7 +218,7 @@ <h2 class="f4">What does it mean if I get an error?</h2>
} else if (respObj.DataAvailableOverBitswap.Responded !== true) {
outText += "❌ The peer did not quickly respond if it had the CID\n"
} else if (respObj.DataAvailableOverBitswap.Found === true) {
outText += " The peer responded that it has the CID\n"
outText += " The peer responded that it has the CID\n"
} else {
outText += "❌ The peer responded that it does not have the CID\n"
}
Expand Down

0 comments on commit d6e994f

Please sign in to comment.