1.1.1 • Published 3 years ago

vue-jest-extended v1.1.1

Weekly downloads
40
License
MIT
Repository
github
Last release
3 years ago

Vue Jest Extended

Build Status dependencies Status devDependencies Status License: MIT

Jest extensions compatible with Vue Test Utils

⚠️ Designed to work with Vue 2.x ⚠️

Features

  • .toHaveEmitted - Check if a @vue/test-utils wrapper has emitted the given event
  • .toHaveEmittedPayload - Check if a @vue/test-utils has emitted an event with the given payload
  • .toExist - Pass if wrapper exists
  • .toBeVisible - Pass if wrapper is not visible

Install

yarn add -D vue-jest-extended

Setup

In your jest configuration:

From Jest v24

"jest": {
  ...
   "setupFilesAfterEnv": ["vue-jest-extended"]
  ...
}

Jest v23 or previous

"jest": {
  ...
  "setupTestFrameworkScriptFile": "vue-jest-extended"
  ...
}

alternatively if you want to combine these matchers with other matchers in your project

"jest": {
  ...
  "setupTestFrameworkScriptFile": "./extensions.js"
  ...
}
/* extensions.js */

import 'vue-jest-extended;
// require('vue-jest-extended);

License

MIT

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

1.0.1-rc

3 years ago

1.0.2-rc

3 years ago

1.0.0-rc

3 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago