initial public commit

This commit is contained in:
Gani Georgiev committed 2022-07-07 00:19:05 +03:00
commit 3d07f0211d
484 files changed
+92412

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
package routine_test
import (
"sync"
"testing"
"github.com/pocketbase/pocketbase/tools/routine"
)
func TestFireAndForget(t *testing.T) {
called := false
fn := func() {
called = true
panic("test")
}
wg := &sync.WaitGroup{}
routine.FireAndForget(fn, wg)
wg.Wait()
if !called {
t.Error("Expected fn to be called.")
}
}