Vitest Demo

This demo shows how to use Vitest for testing a yFiles for HTML web application. For interaction with the web browser it uses Playwright.

To run the test:

  1. Go to the demo's directory demos-ts/testing/vitest.
  2. Run npm install.
  3. Run the test with npm run test.
  4. Run the test UI with npm run test-ui.

The test is run in Chromium in headless mode.

The application under test is the Simple Testable App. The GraphComponent instance is accessed from its parent element through the [data-this] attribute.