chore: add tests for examples

This commit is contained in:
Ian Davis
2021-05-06 13:39:20 +01:00
parent 76e1ce667e
commit 0343b56ad5
12 changed files with 618 additions and 164 deletions

View File

@@ -0,0 +1,14 @@
package main
import (
"testing"
"github.com/libp2p/go-libp2p/examples/testutils"
)
func TestMain(t *testing.T) {
var h testutils.LogHarness
h.ExpectPrefix("Hello World, my hosts ID is ")
h.ExpectPrefix("Hello World, my second hosts ID is ")
h.Run(t, run)
}