mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00

This patch re-implements matching and reporting for test runner. Among other improvements: - test failures now show a short snippet from test - test failures now explicitly say what received and what was expected - `expect.toBe()` now does text diff when gets strings as input - `expect.toEqual` now does object diff
15 lines
327 B
JavaScript
15 lines
327 B
JavaScript
const {TestRunner, Matchers, Reporter} = require('..');
|
|
|
|
const testRunner = new TestRunner();
|
|
const {expect} = new Matchers();
|
|
|
|
require('./testrunner.spec.js').addTests({testRunner, expect});
|
|
|
|
new Reporter(testRunner, {
|
|
verbose: process.argv.includes('--verbose'),
|
|
summary: true,
|
|
showSlowTests: 0,
|
|
});
|
|
testRunner.run();
|
|
|