Skip to content

Instantly share code, notes, and snippets.

@mazedlx
Created June 21, 2018 12:03
Show Gist options
  • Save mazedlx/16f06878d31cdc12263e5e2176a1f8dd to your computer and use it in GitHub Desktop.
Save mazedlx/16f06878d31cdc12263e5e2176a1f8dd to your computer and use it in GitHub Desktop.
AllDepartmentsSelect.spec.js
import { mount } from "@vue/test-utils";
import Component from "../../components/Article/AllDepartmentsSelect.vue";
describe("AllDepartmentsSelect", () => {
let $wrapper;
beforeEach(() => {
$wrapper = mount(Component);
});
test("it calls getDepartments when mounted", () => {
$wrapper.mount();
// this throws an error
// TypeError: Cannot read property 'request' of undefined
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment