eth-dump-genblock/main_test.go

19 lines
353 B
Go
Raw Permalink Normal View History

package main
import (
"os"
"testing"
"github.com/stretchr/testify/assert"
)
func TestMain(t *testing.T) {
args := []string{"eth-dump-genblock", "testdata/genesis.json"}
blockJSON := Main(args)
expected, err := os.ReadFile("testdata/genesis_block.json")
if err != nil {
t.Fatal(err)
}
assert.Equal(t, string(blockJSON), string(expected))
}