Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Stub out or ignore document when running under node #49

Open
nevir opened this issue May 31, 2017 · 0 comments
Open

Stub out or ignore document when running under node #49

nevir opened this issue May 31, 2017 · 0 comments

Comments

@nevir
Copy link
Contributor

nevir commented May 31, 2017

Right now it's a little painful to get going under node (say, when doing shallow rendering w/ Enzyme). As a workaround:

global.document = {
  createElement() {
    return {
      sheet: {
        insertRule() {},
      },
    };
  },
  head: {
    appendChild() {},
  },
};
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant