Skip to content

fix(expect): support constructors in expect.arrayOf - #43126

Merged
Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:fix-43117
Oct 5, 2026
Merged

Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:fix-43117

Conversation

@pavelfeldman

Copy link
Copy Markdown
Member

Summary

  • expect.arrayOf(String) / expect.arrayOf(MyClass) now match by type, as documented, by treating a constructor as expect.any(constructor).

Fixes #43117

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

4 flaky ⚠️ [chromium-library] › library/webmcp.spec.ts:256 › should list and call tools in cross-origin and nested frames `@chromium-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:257 › third party 'Partitioned;' cookies `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:470 › top level 'Partitioned;' cookie and same origin iframe `@firefox-ubuntu-22.04-node20`
⚠️ [webkit-page] › page/page-set-input-files.spec.ts:38 › should upload a folder `@webkit-ubuntu-22.04-node20`

52511 passed, 1268 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [firefox] › mcp/cli-devtools.spec.ts:140 › request* and response* commands support --filename @mcp-windows-latest-firefox

9034 passed, 1495 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🟢 Green — the failure is a confirmed pre-existing flake

Hi, I'm the Playwright bot and I took a first look at the CI failure here.

The only real failure is [firefox] › mcp/cli-devtools.spec.ts:140 › request* and response* commands support --filename on Windows. The same test has failed with the same assertion on several unrelated PRs, while this PR only changes expect.arrayOf constructor matching and its test coverage.

Details

The PR changes packages/playwright/src/matchers/expectLibrary.ts and tests/playwright-test/expect.spec.ts; it does not reach the MCP devtools CLI, Firefox request handling, or the failing test.

Pre-existing flake / infra

Triaged by the Playwright bot - agent run

@pavelfeldman
Pavel Feldman (pavelfeldman) merged commit b9dbe23 into microsoft:main Oct 5, 2026
44 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: GenericAssertions.arrayOf doesn't match documented behaviour

2 participants