summaryrefslogtreecommitdiffstats
path: root/pkg/tasks/async_handler_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/tasks/async_handler_test.go')
-rw-r--r--pkg/tasks/async_handler_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/tasks/async_handler_test.go b/pkg/tasks/async_handler_test.go
index b6edbec20..ebead7aa7 100644
--- a/pkg/tasks/async_handler_test.go
+++ b/pkg/tasks/async_handler_test.go
@@ -5,6 +5,7 @@ import (
"sync"
"testing"
+ "github.com/jesseduffield/gocui"
"github.com/stretchr/testify/assert"
)
@@ -12,7 +13,10 @@ func TestAsyncHandler(t *testing.T) {
wg := sync.WaitGroup{}
wg.Add(2)
- handler := NewAsyncHandler()
+ onWorker := func(f func(gocui.Task)) {
+ go f(gocui.NewFakeTask())
+ }
+ handler := NewAsyncHandler(onWorker)
handler.onReject = func() {
wg.Done()
}