Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ct): hooksConfig types less strict #26771

Closed
wants to merge 1 commit into from

Conversation

sand4rt
Copy link
Collaborator

@sand4rt sand4rt commented Aug 29, 2023

Svelte's context is a Map, would be great if i could pass that directly to the hooksConfig:

test('render context', async ({ mount }) => {
  const component = await mount<HooksConfig>(Context, {
    hooksConfig: {
      context: new Map([
        ['context-key', 'context-value']
      ]),
    }
});

related to:

@github-actions
Copy link
Contributor

Test results for "tests 1"

8 flaky
⚠️ [chromium] › page/page-click.spec.ts:979:3 › should click a button that is overlayed by a permission popup
⚠️ [chromium] › library/tracing.spec.ts:239:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › page/page-event-request.spec.ts:101:3 › should report navigation requests and responses handled by service worker
⚠️ [playwright-test] › ui-mode-test-progress.spec.ts:167:5 › should update tracing network live
⚠️ [chromium] › library/inspector/cli-codegen-python.spec.ts:74:5 › should save the codegen output to a file if specified
⚠️ [chromium] › library/tracing.spec.ts:239:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › library/tracing.spec.ts:395:14 › should produce screencast frames crop
⚠️ [webkit] › library/browsercontext-reuse.spec.ts:50:1 › should reset serviceworker

25557 passed, 595 skipped
✔️✔️✔️

Merge workflow run.

@pavelfeldman
Copy link
Member

Sounds like we are rewriting these types over and over. Do you have an idea on whether it is converting?

@sand4rt
Copy link
Collaborator Author

sand4rt commented Aug 30, 2023

Sounds like we are rewriting these types over and over. Do you have an idea on whether it is converting?

Support for Map, Set and Svelte context was recently added. As a result it is no longer convenient that the hooksConfig is of type JsonObject. I have not seen this coming.

I could also make it a type of any and leave it alone?

@sand4rt sand4rt closed this Sep 6, 2023
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.

None yet

2 participants