Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit ed20b92

Browse files
committed
Remove unused functions
1 parent 4350722 commit ed20b92

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

common/helpers.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -226,22 +226,6 @@ func sobekValueExists(v sobek.Value) bool {
226226
return v != nil && !sobek.IsUndefined(v) && !sobek.IsNull(v)
227227
}
228228

229-
// asSobekValue return v as a sobek value.
230-
// panics if v is not a sobek value.
231-
func asSobekValue(ctx context.Context, v any) sobek.Value {
232-
gv, ok := v.(sobek.Value)
233-
if !ok {
234-
k6ext.Panic(ctx, "unexpected type %T", v)
235-
}
236-
return gv
237-
}
238-
239-
// sobekValueToString returns v as string.
240-
// panics if v is not a sobek value.
241-
func sobekValueToString(ctx context.Context, v any) string {
242-
return asSobekValue(ctx, v).String()
243-
}
244-
245229
// convert is a helper function to convert any value to a given type.
246230
// underneath, it uses json.Marshal and json.Unmarshal to do the conversion.
247231
func convert[T any](from any, to *T) error {

tests/page_test.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,15 +1262,6 @@ func TestPageOn(t *testing.T) {
12621262
}
12631263
}
12641264

1265-
func assertExceptionContains(t *testing.T, rt *sobek.Runtime, fn func(), expErrMsg string) {
1266-
t.Helper()
1267-
1268-
cal, _ := sobek.AssertFunction(rt.ToValue(fn))
1269-
1270-
_, err := cal(sobek.Undefined())
1271-
require.ErrorContains(t, err, expErrMsg)
1272-
}
1273-
12741265
func TestPageTimeout(t *testing.T) {
12751266
t.Parallel()
12761267

0 commit comments

Comments
 (0)