import expect from 'expect';

export default function expectToReturnType(
  creator: (...etc: any[]) => { type: string },
  type: string,
  ...etc: any[]
): void {
  it(`returns the type ${type}`, () => {
    expect(creator(...etc).type).toEqual(type);
  });
}
