feat: publish sanitized custom.97 source

This commit is contained in:
cneicy committed 2026-10-27 20:43:39 +08:00
1 parent 8e6ed0317b
commit 86c0276156
1022 files changed
+69903 -19207

No files matched your search

+5 -3
View File
@@ -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())
}
})
}