Skip to content

Commit

Permalink
Missing 'streams' variable & test renames (#3785)
Browse files Browse the repository at this point in the history
  • Loading branch information
joanlopez authored Jun 10, 2024
1 parent 1f01a9b commit 44d7840
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions js/modules/k6/experimental/streams/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,12 @@ func (mi *ModuleInstance) NewReadableStreamDefaultReader(call sobek.ConstructorC
func NewReadableStreamFromReader(vu modules.VU, reader io.Reader) *sobek.Object {
rt := vu.Runtime()
return newReadableStream(vu, sobek.ConstructorCall{
Arguments: []sobek.Value{rt.ToValue(underlyingSourceForReader(vu, reader))},
Arguments: []sobek.Value{rt.ToValue(underlyingSourceFromReader(vu, reader))},
This: rt.NewObject(),
})
}

func underlyingSourceForReader(vu modules.VU, reader io.Reader) *sobek.Object {
func underlyingSourceFromReader(vu modules.VU, reader io.Reader) *sobek.Object {
rt := vu.Runtime()

underlyingSource := vu.Runtime().NewObject()
Expand Down
2 changes: 1 addition & 1 deletion js/modules/k6/experimental/streams/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"go.k6.io/k6/js/modulestest"
)

func TestNewReadableStreamForReader(t *testing.T) {
func TestNewReadableStreamFromReader(t *testing.T) {
t.Parallel()

// The value to be streamed.
Expand Down

0 comments on commit 44d7840

Please sign in to comment.