mirror of
https://github.com/libp2p/go-libp2p.git
synced 2025-10-16 05:00:49 +08:00
chore: add tests for examples
This commit is contained in:
14
examples/libp2p-host/host_test.go
Normal file
14
examples/libp2p-host/host_test.go
Normal 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)
|
||||
}
|
Reference in New Issue
Block a user