Create Grid & GridEmpty test

This commit is contained in:
2020-11-03 14:09:42 +01:00
parent 9d505d76f8
commit bad40d2a1d
3 changed files with 47 additions and 9 deletions

18
test/GridEmpty.spec.js Normal file
View File

@@ -0,0 +1,18 @@
import { mount } from "@vue/test-utils";
import GridEmpty from "@/components/GridEmpty";
describe("GridEmpty", () => {
it("has default error message.", () => {
const wrapper = mount(GridEmpty);
expect(wrapper.find("p").text()).toBe("0 items to be shown.");
});
it("has custom error message.", () => {
const wrapper = mount(GridEmpty, {
propsData: {
message: "test message"
}
});
expect(wrapper.find("p").text()).toBe("test message");
});
});