Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oleiade committed Nov 10, 2023
1 parent b73723b commit 9f3d2d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion js/modules/k6/experimental/fs/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type FileInfo struct {
Name string `json:"name"`

// Size holds the size of the file in bytes.
Size int `json:"size"`
Size int64 `json:"size"`
}

// Read reads up to len(into) bytes into the provided byte slice.
Expand Down
8 changes: 4 additions & 4 deletions js/modules/k6/experimental/fs/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,10 +577,10 @@ func TestOpenImpl(t *testing.T) {
cache: &cache{},
}

assert.Panics(t, func() {
//nolint:errcheck,gosec
mi.openImpl(testFileName)
})
f, gotErr := mi.openImpl(testFileName)

assert.Error(t, gotErr)
assert.Nil(t, f)
})

t.Run("should return an error if the file does not exist", func(t *testing.T) {
Expand Down

0 comments on commit 9f3d2d4

Please sign in to comment.