New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

stencil-test-helpers

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stencil-test-helpers

Stencil test helpers

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

Stencil Test Helpers

Build Status Coverage Status

This code is a port from the great ember-test-helpers to be used in Stencil projects.

Getting Started

npm install stencil-test-helpers

So helpers know how to do their thing, the TestWindow class provided by this package needs to be used. It behaves as the normal TestWindow, but with a couple of extra magic bits that let the helpers use their magic.

You need to add a removeTestWindow call in the aferEach hook.

The basic scaffold is:

import { TestWindow, removeTestWindow } from 'stencil-test-helpers';

describe('something', () => {
  afterEach(() => {
    removeTestWindow();
  });
});

Helpers

All the helpers accept a target both as a string (CSS selector) or an Element. All helpers will wait until the next tick before and after doing its work.

The available helpers are:

  • blur(target)
  • click(target)
  • doubleClick(target)
  • fillIn(target, value: string)
  • focus(target)
  • getElement(target): Element | null
  • tap(target, options)
  • triggerEvent(target, event, options)
  • triggerKeyEvent(target, keyEventType, keyOrKeyCode, modifiers)

FAQs

Package last updated on 05 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts