ike18t / ts-mockery

Simple type-safe typescript mocking library.
MIT License
44 stars 2 forks source link

Mocking functions that return objects that have properties that are arrays of objects is busted. #15

Closed getsaf closed 6 years ago

getsaf commented 6 years ago
      const dummy = {
        funk: () => ({stuff: [{foo: 1}, {foo: 2}, {foo: 3}]})
      };

      const mockDummy = Mock.of<typeof dummy>({
        funk: () => ({stuff: [{}]}) // <-- This fails!!
      });
ike18t commented 6 years ago

Fixed by: 95ca19bae97d87e50fa14a7b7526409a25373916 Released in version 1.0.1