-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
Description
System info
- Playwright Version:
v1.41.0,1.42.0-alpha-jan-17-2024 - Operating System: All
- Browser: All
- Other info: Works with v1.40.1 and below
Source code
const TestComponent = ({ date }: { date: Date }) => {
console.log('date', date);
return <span>{date.toLocaleDateString()}</span>;
};
export default TestComponent;import { expect, test } from '@playwright/experimental-ct-react';
import TestComponent from './TestComponent';
test('can pass a Date object to the component', async ({ mount, page }) => {
await mount(<TestComponent date={new Date('2000-06-01')} />);
await expect(page.getByText('2000')).toBeInViewport();
});Steps
- Run the test
Expected
Component renders, Date objects were passed from the runner to the browser environment prior to v1.41.0.
Actual
Empty object is passed from the runner.

Reactions are currently unavailable