UNCLASSIFIED

Commit 3d979aad authored by Keith Becker's avatar Keith Becker
Browse files

refactor unit tests

parent a5b26d38
...@@ -198,4 +198,22 @@ describe("SelectAddStudentsToCourseDialog", () => { ...@@ -198,4 +198,22 @@ describe("SelectAddStudentsToCourseDialog", () => {
expect(wrapper.vm.$refs.courseSelect.clear).toHaveBeenCalled(); expect(wrapper.vm.$refs.courseSelect.clear).toHaveBeenCalled();
expect(wrapper.vm.courseStartDate).toEqual(""); expect(wrapper.vm.courseStartDate).toEqual("");
}); });
it("test watch", async () => {
const wrapper = shallowMount(SelectAddStudentsToCourseDialog, {
propsData: {
value: [],
selectedMembers: [],
},
mocks: {
$store: {
commit: jest.fn(),
},
},
vuetify,
});
wrapper.vm.updateCourseMembers = jest.fn();
wrapper.setProps({ selectedMembers: [{ test: "test" }] });
await wrapper.vm.$nextTick();
expect(wrapper.vm.updateCourseMembers).toHaveBeenCalled();
});
}); });
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment