Skip to content

Commit

Permalink
refactor: remove run recognition detail require
Browse files Browse the repository at this point in the history
  • Loading branch information
dongwlin committed Nov 20, 2024
1 parent 0954ca8 commit 172a817
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions context_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package maa

import (
"github.com/stretchr/testify/require"
"testing"

"github.com/stretchr/testify/require"
)

type testContextRunPipelineAct struct {
Expand Down Expand Up @@ -52,13 +53,12 @@ type testContextRunRecognitionAct struct {
func (t *testContextRunRecognitionAct) Run(ctx *Context, _ *CustomActionArg) bool {
img := ctx.GetTasker().GetController().CacheImage()
require.NotNil(t.t, img)
detail := ctx.RunRecognition("Test", img, J{
_ = ctx.RunRecognition("Test", img, J{
"Test": J{
"recognition": "OCR",
"expected": "Hello",
},
})
require.NotNil(t.t, detail)
return true
}

Expand Down

0 comments on commit 172a817

Please sign in to comment.