Skip to content

Make require()s that are called outside of beforeEach() or it() specs spit out a warning #15

@jeffmo

Description

@jeffmo

It's really unintuitive that you should put your require()s either in your specs or in your beforeEach() (because jest clears the module registry cache in between each spec).

We should see if we can alleviate confusion here by console.warn()ing when a require() happens outside of an it() or a beforeEach() function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions