Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
absorbb committed Mar 21, 2023
1 parent 532e78e commit 03fae76
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions server/script/node/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,16 +228,6 @@ func TestAsync(t *testing.T) {
assert.Equal(t, 10, resp)
}

func TestFetchUnavailableInExpressions(t *testing.T) {
tt := &testingT{T: t, exec: script.Expression("typeof fetch")}
defer tt.load().close()

var resp string
err := tt.Execute("", nil, &resp, nil)
assert.NoError(t, err)
assert.Equal(t, "undefined", resp)
}

func TestDescribeModule(t *testing.T) {
tt := &testingT{T: t, exec: script.File("testdata/js/describe_test.js")}
defer tt.load().close()
Expand All @@ -254,7 +244,7 @@ func TestDescribeModule(t *testing.T) {
}, symbols)
}

func TestFetchIsAvailableOnlyInValidatorModuleFunction(t *testing.T) {
func TestFetchIsAvailable(t *testing.T) {
tt := &testingT{T: t, exec: script.File("testdata/js/fetch_test.js")}
defer tt.load().close()

Expand All @@ -265,7 +255,7 @@ func TestFetchIsAvailableOnlyInValidatorModuleFunction(t *testing.T) {

err = tt.Execute("destination", nil, &resp, nil)
assert.NoError(t, err)
assert.Equal(t, "undefined", resp)
assert.Equal(t, "function", resp)
}

func TestHeaders(t *testing.T) {
Expand Down

0 comments on commit 03fae76

Please sign in to comment.