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

Stub out or ignore document when running under node #49

@nevir

Description

@nevir

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() {},
  },
};

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