0.0.12 • Published 5 years ago

elr-vue-jest-helpers v0.0.12

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

ELR Vue Test Helpers

A small library of test methods to speed up Vue component testing

Build Status License: MIT npm

For use with VueTestUtils and Jest

npm install elr-vue-jest-helpers --save-dev

or

yarn add elr-vue-jest-helpers -D

import helpers from 'elr-vue-jest-helpers';

Initialize the helpers library after you mount your wrapper component pass in the Vue component instance pass in the expect method from Jest all methods are chainable

h.init({wrapper, expect});

*** if you mount your component again you must reinitialize the test utilities so they can interact with your new wrapper.

Methods

  • select
    • select an option in a select form field
h.select('California', '#states');
  • type
    • type some input into a form field
  • blur
    • trigger blur event on form field
  • submit
    • trigger a submit event on a form field
  • clear
    • clear value from form field
  • click
    • trigger a click event
  • emit
    • test that an event is emitted
  • doesNotEmit
    • test that an event is not emmitted
  • payloadEquals
    • check the content of an event payload
  • contains
  • doesNotContain
  • matches
  • see
  • html
  • hasStyle
  • isHidden
  • isValidInput
  • isInvalidInput
  • hasCount
  • hasClass
  • notToHaveClass
  • isDisabled
  • isNotDisabled
  • text
0.0.12

5 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago