vfg-field-array
Version:
A vue-form-generator field to handle arrays
16 lines (11 loc) • 463 B
JavaScript
import ModuleLibrary from "../index";
test("Should register all components when installed", () => {
const component = jest.fn();
const Vue = { component };
ModuleLibrary.install(Vue);
// Test if a particular component was registered
expect(component).toBeCalledWith("field-array", expect.any(Object));
// Test how many times component got registered
const totalOfComponents = 1;
expect(component).toHaveBeenCalledTimes(totalOfComponents);
});