Fix Safari CI a bit (#4778)

Safari doesn't have URL.canParse
This commit is contained in:
Hood Chatham 2024-05-21 14:43:12 -04:00 committed by GitHub
parent 9389a042ed
commit f352fd34fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -29,13 +29,13 @@ def test_snapshot_simple(selenium_standalone_noload):
const py1 = await loadPyodide({_makeSnapshot: true});
py1.runPython(`
from js import Headers, URL
canParse = URL.canParse
createObjectURL = URL.createObjectURL
`);
const snapshot = py1.makeMemorySnapshot();
const py2 = await loadPyodide({_loadSnapshot: snapshot});
assert(() => py2.globals.get("Headers") === Headers);
assert(() => py2.globals.get("URL") === URL);
assert(() => py2.globals.get("canParse") === URL.canParse);
assert(() => py2.globals.get("createObjectURL") === URL.createObjectURL);
"""
)