Open hmil opened 3 years ago
After the workaround, now I'm getting: Failed: Unexpected property access: <ngForm>.outerHTML
For the record, here is what we found:
ngForm is not mocked by shallow-render. If your <input>
components are wrapped by custom components, then those custom components are mocked and ngForm thinks that the form is empty, because it cannot see any actual <input>
component.
This makes it pretty tricky to mock forms. Maybe one good way around this could be to tell shallow-render not to mock your low-level input components...
The following has been observed when omnimock mocks are passed as arguments to Angular template bindings:
The root cause is unknown. As a workaround, pass an empty backing object to the mock factory: