Skip to content

Releases: hmsk/jest-matcher-vue-test-utils

v2.0.0-0

07 Jan 10:37
v2.0.0-0
aca8b8c
Compare
Choose a tag to compare
v2.0.0-0 Pre-release
Pre-release
  • Support async function for the first argument of toShow, toHide
  • Drop Jest 22 support
  • Update devDependencies

v1.8.0...v2.0.0-0

Follow @types/jest 24.0.20

28 Oct 14:07
v1.8.0
d90b612
Compare
Choose a tag to compare
  • Update typedef to follow the latest @types/jest, so you may see the type check errors if you use older @types/jest
  • Update devDependencies

v1.7.0...v1.8.0

Show friendly diff when payload doesn't match

17 Sep 03:58
v1.7.0
960dfcf
Compare
Choose a tag to compare
  • Support friendly diff for unmatched payloads #146
  • Update dependencies

image

image

v1.6.0...v1.7.0

Pre: Friendly Diff

15 Sep 08:44
2d61b79
Compare
Choose a tag to compare
Pre: Friendly Diff Pre-release
Pre-release
  • Support friendly diff for unmatched payloads #146
  • Update dependencies

v1.6.0...v1.7.0-0

v1.6.0

06 Jun 01:19
v1.6.0
77efabc
Compare
Choose a tag to compare
  • Allow any version of jest after 22
  • Provide proper type definition for Vuex plugin

v1.5.2...v1.6.0

Thanks for your contributions

v1.5.2

05 Jun 16:06
v1.5.2
e84d888
Compare
Choose a tag to compare
  • Refactoring file structure
  • Update devDependencies

v1.5.1...v1.5.2

v1.5.1

21 Mar 07:58
v1.5.1
ee351a2
Compare
Choose a tag to compare
  • Remove unnecessary file
  • Fix README
  • Update devDependencies
    • rollup: 1.6.0 -> 1.7.0
    • typescript: 3.3.3333 -> 3.3.4000
    • vue: 2.6.9 -> 2.6.10
    • vue-template-compiler: 2.6.9 -> 2.6.10

v1.5.0...v1.5.1

Add new matchers: toDispatch, toHaveDispatched

19 Mar 09:21
v1.5.0
362fe76
Compare
Choose a tag to compare

New Matchers

toDispatch

Assert that a function dispatches specific Vuex action (with payload)

import Component from "./click-store.vue";

it("Dispatches the action on store by click", () => {
  const wrapper = shallowMount(Component)  expect(() => {
    wrapper.trigger("click");
  }).toDispatch(wrapper, "awesomeAction"); // Passes

  expect(() => {
    wrapper.trigger("click");
  }).toDispatch(wrapper, "awesomeAction", 'click'); // Passes
});

toHaveDispatched

Assert that a component dispatched specific Vuex action (with payload)

import Component from "./click-store.vue";
import { vuexPlugin } from "jest-matcher-vue-test-utils";

it("Dispatches the action on store by click", () => {
  const store = new Vuex.Store({
    actions: dispatchStore() {},
    plugins: [vuexPlugin()] // Requires adding plugin to use `toHaveDispatched` matcher
  });

  const wrapper = shallowMount(Component, { store })
  wrapper.trigger("click");
  expect(wrapper).toHaveDispatched("awesomeAction"); // Passes
  expect(wrapper).toHaveDispatched("awesomeAction", "click"); // Passes
});

Update dependencies

  • rollup: 1.1.2 -> 1.6.0
  • rollup-plugin-commonjs: 9.2.0 -> 9.2.1
  • rollup-plugin-json: 3.1.0 -> 4.0.0
  • rollup-plugin-node-resolve: 4.0.0 -> 4.0.1
  • rollup-plugin-typescript2: 0.19.1 -> 0.20.1
  • typescript: 3.3.3 -> 3.3.3333
  • vue: 2.6.6 -> 2.6.9
  • vue-jest: 3.0.3 -> 3.0.4
  • vue-template-compiler: 2.6.6 -> 2.6.9
  • vuex: Added 3.1.0

v1.4.0...v1.5.0

v1.4.0

13 Feb 09:05
v1.4.0
1318e34
Compare
Choose a tag to compare
  • Support multiple payloads by toHaveEmitted d065487
  • Support multiple arguments by toEmit Close #28 a1c0d7e
  • Switch publishing manager to np on global 47bf300
  • Merge pull request #27 from hmsk/renovate/vue-monorepo 3e9dfc8
  • chore(deps): update vue monorepo to v2.6.6 7a12a3a
  • Merge pull request #26 from hmsk/renovate/vue-monorepo 3c36382
  • chore(deps): update vue monorepo to v2.6.5 bff0c82

v1.3.3...v1.4.0

v1.3.3

10 Feb 22:24
d21fc19
Compare
Choose a tag to compare

Changes from v1.3.0

Chore

  • Separate some matchers to individual files
  • Maintain README

Update devDependencies

  • Node: 8.15 -> 10.15
  • typescript: 3.2.4 -> 3.3.3
  • @types/jest: 23.3.13 -> 23.3.14
  • @vue/test-utils: 1.0.0-beta.28 -> 1.0.0-beta.29
  • vue: 2.5.22 -> 2.6.4
  • vue-jest: 3.0.2 -> 3.0.3
  • vue-template-compiler: 2.5.22 -> 2.6.4