Closed nogizhopaboroda closed 6 years ago
api proposal:
storiesOf('Foo') //as decorator .addDecorator(withMock({ ...mocks map (see below)... })) //in story .add('some story', withMock({ "foo/bar": (url, params) => {}, "foo/baz*": { bla: baz }, "foo/baz*": [{ mock: () => {}, times: 1, delay: 2000 }, { mock: () => {} }], })
example mock lib: http://www.wheresrhys.co.uk/fetch-mock
implemented in https://github.com/modulor-js/modulor-storybook/pull/49
api proposal:
example mock lib: http://www.wheresrhys.co.uk/fetch-mock