1.2.1 • Published 9 months ago

@velmalabs/testsuite v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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/testsuite

Usage

To use this package, you can run the following command:

  npm testsuite [playwright options]

Examples

Run tests in headless mode

  npm testsuite

Run tests in ui mode

  npm testsuite --ui

Run tests in headless mode with specific browser

  npm testsuite --browser=firefox

Writing 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

1.2.0

9 months ago

1.1.1

9 months ago

1.0.2

9 months ago

1.1.0

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago

1.1.9

9 months ago

1.1.8

9 months ago

1.0.9

9 months ago

1.1.7

9 months ago

1.0.8

9 months ago

1.1.6

9 months ago

1.0.7

9 months ago

1.1.4

9 months ago

1.0.5

9 months ago

1.1.3

9 months ago

1.0.4

9 months ago

1.2.1

9 months ago

1.1.2

9 months ago

1.0.3

9 months ago

1.1.12

9 months ago

1.1.11

9 months ago

1.1.10

9 months ago

1.0.11

9 months ago

1.0.10

9 months ago

0.1.16

9 months ago

0.1.15

9 months ago

0.1.14

9 months ago

0.1.13

9 months ago

0.1.12

9 months ago

0.1.11

9 months ago

0.1.10

9 months ago

0.1.9

9 months ago

0.1.8

9 months ago

0.1.7

9 months ago

0.1.6

9 months ago

0.1.5

9 months ago

0.1.4

9 months ago

0.1.3

9 months ago

0.1.2

9 months ago

0.1.1

9 months ago

0.1.0

9 months ago