Skip to content

Commit 37fa400

Browse files
committed
test: fix playwright test for recent playwright versions
1 parent e4483fc commit 37fa400

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/adapters/browser/run-wasi.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ async function configureRoutes(context, harnessURL) {
7979
}
8080

8181
async function runWASIOnBrowser(options) {
82-
const browser = await chromium.launch();
82+
const browser = await chromium.launch({channel: "chromium"});
8383
const context = await browser.newContext();
8484
const harnessURL = 'http://browser-wasi-shim.localhost'
8585

8686
await configureRoutes(context, harnessURL);
8787

8888
const page = await context.newPage();
8989
// Expose stdout/stderr bindings to allow test driver to capture output.
90-
page.exposeBinding("bindingWriteIO", (_, buffer, destination) => {
90+
await page.exposeBinding("bindingWriteIO", (_, buffer, destination) => {
9191
buffer = Buffer.from(buffer);
9292
switch (destination) {
9393
case "stdout":
@@ -101,7 +101,7 @@ async function runWASIOnBrowser(options) {
101101
}
102102
});
103103
// Expose a way to serialize preopened directories to the browser.
104-
page.exposeBinding("bindingDerivePreopens", async (_, dirs) => {
104+
await page.exposeBinding("bindingDerivePreopens", async (_, dirs) => {
105105
return await derivePreopens(dirs);
106106
});
107107

0 commit comments

Comments
 (0)