Skip to content

Commit

Permalink
Update jshandle tests with require
Browse files Browse the repository at this point in the history
This will stop the test before a NPD occurs.
  • Loading branch information
ankur22 committed Jun 11, 2024
1 parent e645185 commit 4da70f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/js_handle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestJSHandleEvaluate(t *testing.T) {
require.NotNil(t, result)

got, err := result.Evaluate(tt.pageFunc, tt.args...)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, tt.expected, got)
})
}
Expand Down Expand Up @@ -98,11 +98,11 @@ func TestJSHandleEvaluateHandle(t *testing.T) {
require.NotNil(t, result)

got, err := result.EvaluateHandle(tt.pageFunc, tt.args...)
assert.NoError(t, err)
require.NoError(t, err)
assert.NotNil(t, got)

j, err := got.JSONValue()
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, tt.expected, j)
})
}
Expand Down

0 comments on commit 4da70f2

Please sign in to comment.