eventsourcemock icon indicating copy to clipboard operation
eventsourcemock copied to clipboard

Setup docs

Open jdelafon opened this issue 5 years ago • 0 comments

Compared to the current docs, when one creates a React app with the now standard npm create-react-app, the way to integrate this library will rather be in src/setupTests.js :

// src/setupTests.js
import EventSource from "eventsourcemock";

Object.defineProperty(window, 'EventSource', {
    value: EventSource,
});

jdelafon avatar Apr 13 '19 19:04 jdelafon