@velmalabs/testsuite v1.2.1
Velma - Test Suite
This package contains the test suite of Velma.
What is Test Suite?
This package makes it easy to test svelte 5 components using playwright.
Installation
Run the following command to install the package:
npm install @velmalabs/testsuiteUsage
To use this package, you can run the following command:
npm testsuite [playwright options]Examples
Run tests in headless mode
npm testsuiteRun tests in ui mode
npm testsuite --uiRun tests in headless mode with specific browser
npm testsuite --browser=firefoxWriting Tests
To write tests, you can create a file with the .test.js extension in your project.
import {render, test, expect} from "@velmalabs/testsuite";
test('button', async () => {
let clicked = false;
const screen = await render('./Button.svelte', {
text: 'Hello',
onclick: () => clicked = true
});
const button = screen.locator('button');
await button.click();
expect(clicked).toBe(true);
});Resources
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago