Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

@tigerface/lwc-test-utils

0.0.5 • Public • Published

LWC Test Utils

A collection of test utilities for unit testing LWC components with Jest.

Turn repetitive code like this:

// update the inputs value
inputEl.value = value;
 
// fire change event
const changeEvent = new CustomEvent('change');
inputEl.dispatchEvent(changeEvent);

Into clean declarative code like this:

Simulate.inputChange(lightningInputEl, NEW_VALUE);

Getting Started

Install the package:

npm install -D @tigerface/lwc-test-utils

Import the Simulate class:

import { Simulate } from '@tigerface/lwc-test-utils';

Simulate!

Simulate.inputChange(lightningInputEl, NEW_VALUE);

Contributions are welcome.

Install

npm i @tigerface/lwc-test-utils

DownloadsWeekly Downloads

1

Version

0.0.5

License

MIT

Unpacked Size

375 kB

Total Files

35

Last publish

Collaborators

  • avatar