Skip to content

Commit c367729

Browse files
Report uncaught exceptions in example e2e test suite
Also fix use of undeclared `expect` method
1 parent 6a8d270 commit c367729

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/npm-packages/ruby-wasm-wasi/test-e2e/examples/examples.spec.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
import { test, expect, Page } from "@playwright/test";
22
import path from "path";
3-
import { waitForRubyVM, setupDebugLog, setupProxy } from "../support";
3+
import {
4+
waitForRubyVM,
5+
setupDebugLog,
6+
setupProxy,
7+
setupUncaughtExceptionRejection,
8+
} from "../support";
49
import { readFileSync } from "fs";
510
import http from "http";
611
import https from "https";
712

8-
test.beforeEach(async ({ context }) => {
13+
test.beforeEach(async ({ context, page }) => {
914
setupDebugLog(context);
15+
setupUncaughtExceptionRejection(page);
1016
if (process.env.RUBY_NPM_PACKAGE_ROOT) {
1117
setupProxy(context);
1218
} else {

packages/npm-packages/ruby-wasm-wasi/test-e2e/support.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BrowserContext, Page } from "@playwright/test";
1+
import { BrowserContext, Page, expect } from "@playwright/test";
22
import path from "path";
33

44
export const waitForRubyVM = async (page: Page) => {

0 commit comments

Comments
 (0)