MCPcopy Create free account
hub / github.com/buke/quickjs-go / useStableOwnerHooksForLegacySubtests

Function useStableOwnerHooksForLegacySubtests

context_test.go:13–22  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11)
12
13func useStableOwnerHooksForLegacySubtests(t *testing.T) {
14 oldGIDHook := ownerCheckCurrentGoroutineID
15 oldThreadHook := ownerCheckCurrentThreadID
16 ownerCheckCurrentGoroutineID = func() uint64 { return 1 }
17 ownerCheckCurrentThreadID = func() uint64 { return 1 }
18 t.Cleanup(func() {
19 ownerCheckCurrentGoroutineID = oldGIDHook
20 ownerCheckCurrentThreadID = oldThreadHook
21 })
22}
23
24func TestContextBasics(t *testing.T) {
25 newTestContext := func(t *testing.T) *Context {

Calls

no outgoing calls

Tested by

no test coverage detected