This repository has been archived by the owner on Jan 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99f13df
to
1013570
Compare
ankur22
reviewed
May 18, 2022
ankur22
reviewed
May 18, 2022
ankur22
reviewed
May 18, 2022
ankur22
reviewed
May 18, 2022
ankur22
reviewed
May 18, 2022
ankur22
reviewed
May 18, 2022
ankur22
reviewed
May 18, 2022
ankur22
reviewed
May 18, 2022
ankur22
reviewed
May 18, 2022
Hey, @ankur22, thanks for your review 🙏 I made the following changes according to your suggestions. I split the Renamings:
By the way, note that I needed to remove the package common
import (
"testing"
"github.com/grafana/xk6-browser/k6/k6test"
"github.com/stretchr/testify/assert"
)
// ...other content here And there is no problem with that file. Update: I guess I found a solution to this problem in #316 🥳 |
inancgumus
added a commit
that referenced
this pull request
May 18, 2022
Renamings: * `RT` -> `Runtime` * `k6.NewMockVU` -> `k6test.NewVU` * `V` -> `ToGojaValue` * `TestBrowser.RT|V` -> `.runtime|toGojaValue` I split the `k6` package into `k6` and `k6test`. By the way, note that I needed to use `//nolint` in a couple of places because the gci linter has bugs that prevent me from passing the linter (see: daixiang0/gci#59).
inancgumus
added a commit
that referenced
this pull request
May 18, 2022
Renamings: * `RT` -> `Runtime` * `k6.NewMockVU` -> `k6test.NewVU` * `V` -> `ToGojaValue` * `TestBrowser.RT|V` -> `.runtime|toGojaValue` I split the `k6` package into `k6` and `k6test`. By the way, note that I needed to use `//nolint` in a couple of places because the gci linter has bugs that prevent me from passing the linter (see: daixiang0/gci#59).
8331669
to
7b38e23
Compare
inancgumus
added a commit
that referenced
this pull request
May 18, 2022
Renamings: * `RT` -> `Runtime` * `k6.NewMockVU` -> `k6test.NewVU` * `V` -> `ToGojaValue` * `TestBrowser.RT|V` -> `.runtime|toGojaValue` I split the `k6` package into `k6` and `k6test`. By the way, note that I needed to use `//nolint` in a couple of places because the gci linter has bugs that prevent me from passing the linter (see: daixiang0/gci#59).
7b38e23
to
42a2c79
Compare
Merged
ankur22
reviewed
May 19, 2022
ankur22
approved these changes
May 19, 2022
- newMockVU was duplicated. This commit moves it into a new package named k6. - Replaces "mockVU" to "vu" for brevity. - Instead of crowding the common package (which is already big), moves the handling of VUs in contexts to the k6 package. - Provides helper methods in the k6 package for the function that we need to use frequently. - Splits the `k6` package into `k6` and `k6test`.
42a2c79
to
dcff2c3
Compare
ankur22
approved these changes
May 19, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors the VU usage in the extension.
rt
,state
, andsamples
fields from the test browser according to the new k6 modules interface.newMockVU
was duplicated. This commit moves it into a new package namedk6
.mockVU
withvu
for brevity.Renamings:
mockVu
->vu
mockVU.RuntimeField.ToValue
->vu.ToGojaValue
tests/test_browser.go runtime|toGojaValue
test_context.go mockVU/newMockVU
->k6test.VU
k6test.NewVU
common/helpers_test.go mockVU/newMockVU
->k6test.VU
k6test.NewVU
GetVU(ctx).Runtime()
->k6.Runtime(ctx)
vu.CtxField
->vu.Context()
common.WithVU
->k6.WithVU
common.GetVU
->k6.GetVU