qbtrade/pkg/optimizer/local_test.go

22 lines
363 B
Go
Raw Normal View History

2024-06-27 14:42:38 +00:00
package optimizer
import (
"os"
"testing"
"github.com/stretchr/testify/assert"
)
func Test_jsonToYamlConfig(t *testing.T) {
err := os.Mkdir(".tmpconfig", 0755)
assert.NoError(t, err)
tf, err := jsonToYamlConfig(".tmpconfig", []byte(`{
}`))
assert.NoError(t, err)
assert.NotNil(t, tf)
assert.NotEmpty(t, tf.Name())
_ = os.RemoveAll(".tmpconfig")
}