ike18t / ts-mockery

Simple type-safe typescript mocking library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

getsaf opened this issue · comments

      const dummy = {
        funk: () => ({stuff: [{foo: 1}, {foo: 2}, {foo: 3}]})
      };

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

Fixed by: 95ca19b
Released in version 1.0.1