Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Feb 26, 2024
1 parent a67c336 commit 2967a13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/async/test_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,17 +216,17 @@ async def test_evaluate_evaluate_date(page: Page) -> None:
result = await page.evaluate(
'() => ({ date: new Date("2020-05-27T01:31:38.506Z") })'
)
assert result == {"date": datetime.fromisoformat("2020-05-27T01:31:38.506Z")}
assert result == {"date": datetime.strptime("2020-05-27T01:31:38.506Z", "%Y-%m-%dT%H:%M:%S.%fZ")}


async def test_evaluate_roundtrip_date(page: Page) -> None:
date = datetime.fromisoformat("2020-05-27T01:31:38.506Z")
date = datetime.strptime("2020-05-27T01:31:38.506Z", "%Y-%m-%dT%H:%M:%S.%fZ")
result = await page.evaluate("date => date", date)
assert result == date


async def test_evaluate_jsonvalue_date(page: Page) -> None:
date = datetime.fromisoformat("2020-05-27T01:31:38.506Z")
date = datetime.strptime("2020-05-27T01:31:38.506Z", "%Y-%m-%dT%H:%M:%S.%fZ")
result = await page.evaluate(
'() => ({ date: new Date("2020-05-27T01:31:38.506Z") })'
)
Expand Down

0 comments on commit 2967a13

Please sign in to comment.