mirror of
https://github.com/tester-army/e2e.git
synced 2026-11-22 18:19:48 +08:00
* feat(runner): execute suites through e2e/runner * fix(runner): handle review edge cases and deterministic verification * fix(runner): isolate suite output and narrow public execution options * docs(runner): note RUNNER_BUSY on openHost and cached helper modules * chore(changeset): patch bump while e2e is 0.x * feat(runner): send e2e_run_completed telemetry from run() * docs(telemetry): scope run() event to completed runs, mention notice --------- Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
19 lines
524 B
TypeScript
19 lines
524 B
TypeScript
import type { E2EConfig } from 'e2e';
|
|
import { run } from 'e2e/runner';
|
|
import { web } from '@e2e-dev/web';
|
|
|
|
const config: E2EConfig = {
|
|
targets: [{ name: 'web', engine: web(), app: { url: 'http://localhost:3000' } }],
|
|
};
|
|
const controller = new AbortController();
|
|
const result = await run({
|
|
config,
|
|
files: ['tests/signup.e2e.ts'],
|
|
interruptSignal: controller.signal,
|
|
onEvent(event) {
|
|
if (event.type === 'test-started') console.log(event.title);
|
|
},
|
|
});
|
|
|
|
console.log(result.status, result.report.run.summary);
|