Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JoshuaKGoldberg opened this issue Jun 5, 2020 · 0 comments
Open
Labels
type: feature New enhancement or request type: question Further information is requested

Comments

@JoshuaKGoldberg
Copy link
Owner

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('...', () => {/* ... */});
});
@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request type: question Further information is requested labels Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New enhancement or request type: question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant