Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Update k6 dependency and JS module structure to v0.35.0 #122

Merged
merged 2 commits into from
Nov 18, 2021

Conversation

imiric
Copy link
Contributor

@imiric imiric commented Nov 17, 2021

Closes #121

@CLAassistant
Copy link

CLAassistant commented Nov 17, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@robingustafsson robingustafsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, but I haven't dug into the new module API yet. I do think we eventually should switch to exporting the BrowserTypes explicitly like Playwright:

import { chromium, firefox, webkit } from "k6/x/browser";

const browser = chromium.launch(opts);

rather than our current:

import launcher from "k6/x/browser";

const browser = launcher.launch('chromium', opts);

This PR also reminded me that we need to fix our "devices" list so you'd ideally be able to write:

import { chromium, devices } from "k6/x/browser";

const browser = chromium.launch(opts);
const context = browser.newContext({ ...devices['iPhone 13'] });

I'll create an issue about it...

Copy link
Member

@inancgumus inancgumus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we just need to fix the comments.

main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
@imiric imiric requested a review from inancgumus November 18, 2021 08:40
@imiric imiric merged commit ea382b0 into main Nov 18, 2021
@imiric imiric deleted the fix/121-js-module branch November 18, 2021 09:13
@inancgumus inancgumus added the dependencies Pull requests that update a dependency file label Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to build xk6-browser
4 participants