Skip to content

Consider allowing usage outside describe()s to set up base state #19

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

If you want the same state to be set in all unit tests in a file, this is how you do it now:

describe('...', () => {
  beforeEach(() => {
    mockReactRedux().state({ value: true });
  });

  it('...', () => {/* ... */});
});

What if mockReactRedux() could be called in all its normal ways outside a test to apply some defaults?

mockReactRedux().state({ value: true });

describe('...', () => {
  it('...', () => {/* ... */});
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureNew enhancement or request 🚀type: questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions