gojs: refactors out gojs.Config type (#1240)

In order to support more configuration, we should stop using context as
it is getting gnarly.

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2023-03-14 21:27:47 -07:00
committed by GitHub
parent 00c53d19a2
commit f24a3f49a4
22 changed files with 228 additions and 142 deletions

View File

@@ -5,7 +5,6 @@ import (
"context"
"testing"
"github.com/tetratelabs/wazero"
"github.com/tetratelabs/wazero/experimental"
"github.com/tetratelabs/wazero/experimental/logging"
"github.com/tetratelabs/wazero/internal/testing/require"
@@ -18,7 +17,7 @@ func Test_time(t *testing.T) {
loggingCtx := context.WithValue(testCtx, experimental.FunctionListenerFactoryKey{},
logging.NewHostLoggingListenerFactory(&log, logging.LogScopeClock))
stdout, stderr, err := compileAndRun(loggingCtx, "time", wazero.NewModuleConfig())
stdout, stderr, err := compileAndRun(loggingCtx, "time", defaultConfig)
require.EqualError(t, err, `module "" closed with exit_code(0)`)
require.Zero(t, stderr)