feat: publish sanitized custom.97 source
This commit is contained in:
1022 files changed
+69903
-19207
No files matched your search
@@ -7,6 +7,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/QuantumNous/new-api/common"
|
||||
pluginruntime "github.com/QuantumNous/new-api/pkg/jsplugin"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
@@ -51,9 +52,10 @@ func TestDecodePluginProtocolEventResultPreservesStatePresence(t *testing.T) {
|
||||
assert.Empty(t, result.State.Value)
|
||||
}
|
||||
|
||||
if result.State.Present {
|
||||
_, err = result.State.PluginValue()
|
||||
require.NoError(t, err)
|
||||
if testCase.wantPresent && !testCase.wantNull {
|
||||
assert.Equal(t, pluginruntime.RawJSON(result.State.Value), result.State.PluginValue())
|
||||
} else {
|
||||
assert.Nil(t, result.State.PluginValue())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user