From b5ff202df57e398bb4f40c7a0e875a6c547bdd54 Mon Sep 17 00:00:00 2001 From: ankur22 Date: Tue, 11 Jun 2024 15:17:29 +0100 Subject: [PATCH] Update jshandle tests with require This will stop the test before a NPD occurs. --- tests/js_handle_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/js_handle_test.go b/tests/js_handle_test.go index bed6fb7e7..7b1bb33e3 100644 --- a/tests/js_handle_test.go +++ b/tests/js_handle_test.go @@ -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) }) } @@ -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) }) }