Closed scottdurow closed 3 years ago
Fixes #44
This test will now pass:
it("should fire OnChange with eventContext", () => { const onChangeEventMock = jest.fn(); attribute.addOnChange(onChangeEventMock); attribute.fireOnChange(); expect(onChangeEventMock).toBeCalledWith(XrmMockGenerator.getEventContext()); });
See https://github.com/scottdurow/xrm-mock/blob/0ccb168c5d19d712a0ea16a7c43e4b1e4e5fbfc7/test/xrm-mock-generator/builder.test.ts#L282
Note: Now that XrmMockGenerator is imported into attribute.mock.ts - there was an import order issue with the tests - so I've refactored the imports on the tests that were failing.
XrmMockGenerator
attribute.mock.ts
Thanks @scottdurow. I've built and published a latest version 3.5.1 including your changes. https://www.npmjs.com/package/xrm-mock
Fixes #44
This test will now pass:
See https://github.com/scottdurow/xrm-mock/blob/0ccb168c5d19d712a0ea16a7c43e4b1e4e5fbfc7/test/xrm-mock-generator/builder.test.ts#L282
Note: Now that
XrmMockGenerator
is imported intoattribute.mock.ts
- there was an import order issue with the tests - so I've refactored the imports on the tests that were failing.