1.2.1 • Published 7 months ago

@velmalabs/testsuite v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 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

7 months ago

1.1.1

7 months ago

1.0.2

7 months ago

1.1.0

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago

1.1.9

7 months ago

1.1.8

7 months ago

1.0.9

7 months ago

1.1.7

7 months ago

1.0.8

7 months ago

1.1.6

7 months ago

1.0.7

7 months ago

1.1.4

7 months ago

1.0.5

7 months ago

1.1.3

7 months ago

1.0.4

7 months ago

1.2.1

7 months ago

1.1.2

7 months ago

1.0.3

7 months ago

1.1.12

7 months ago

1.1.11

7 months ago

1.1.10

7 months ago

1.0.11

7 months ago

1.0.10

7 months ago

0.1.16

7 months ago

0.1.15

7 months ago

0.1.14

7 months ago

0.1.13

7 months ago

0.1.12

7 months ago

0.1.11

7 months ago

0.1.10

7 months ago

0.1.9

7 months ago

0.1.8

7 months ago

0.1.7

7 months ago

0.1.6

7 months ago

0.1.5

7 months ago

0.1.4

7 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago