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:
- Go to the demo's directory
demos-ts/testing/vitest. - Run
npm install. - Run the test with
npm run test. - 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. To access yFiles in Vitest, the GraphComponent is set as a global variable in that application.