github.com/nevalang/neva@v0.23.1-0.20240507185603-7696a9bb8dda/e2e/const_refs_verbose/e2e_test.go (about)

     1  package test
     2  
     3  import (
     4  	"os/exec"
     5  	"testing"
     6  
     7  	"github.com/stretchr/testify/require"
     8  )
     9  
    10  // Nested map has only one key because keys are unordered
    11  // so having order in test will make it flacky.
    12  func Test(t *testing.T) {
    13  	cmd := exec.Command("neva", "run", "main")
    14  
    15  	out, err := cmd.CombinedOutput()
    16  	require.NoError(t, err)
    17  
    18  	require.Equal(
    19  		t,
    20  		`{"l": [1, 2, 3], "m": {"key": 1}}
    21  `,
    22  		string(out),
    23  	)
    24  
    25  	require.Equal(t, 0, cmd.ProcessState.ExitCode())
    26  }