Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function mockProductDisplayItemMainMultiCart() {
fetchMock.restore();
mockCommonProductDisplayResponses(fetchMock);
mockItemLookupPlain(fetchMock);
mockMultiCartResponse(fetchMock);
}
export function mockProductDisplayItemMainPlain() {
fetchMock.restore();
mockCommonProductDisplayResponses(fetchMock);
mockItemLookupPlain(fetchMock);
}
export function mockProductDisplayItemMainColorAndSize() {
fetchMock.restore();
mockCommonProductDisplayResponses(fetchMock);
mockItemLookupColorAndSize(fetchMock);
mockItemSelections(fetchMock);
}
.then(() => {
if (test.mock) fetchMock.restore();
done();
})
.catch((err) => {
export function mockProductListLoadMoreFromSearchResponse() {
fetchMock.restore();
mockSearchResponse(fetchMock);
}
export function mockPaymentFormSuccess() {
fetchMock.restore();
mockLoginResponse(fetchMock);
mockPaymentInstrumentForm(fetchMock);
mockPaymentInstrumentFormActionSuccess(fetchMock);
}
export default function mockCommonCategoryItemsMainResponses() {
fetchMock.restore();
mockLoginResponse(fetchMock);
mockLookupForm(fetchMock);
mockNavigationLookup(fetchMock);
}
export function mockFetchMultiCart() {
fetchMock.restore();
mockLoginResponse(fetchMock);
mockMultiCartResponse(fetchMock);
}
export function mockFetchNavigationData() {
fetchMock.restore();
mockLoginResponse(fetchMock);
mockMultiCartResponse(fetchMock);
}
.add('all', () => {
fetchMock.restore();
fetchMock.get('/mocked-url-for-restricted-note-content', { text: 'DANGEROUS restricted note content' });
return (<div>
{testScenarios().map(scenario => (
<div style="{{marginLeft:">
<h3>{scenario.label}</h3>
<hr>
{storyRender(storyProps(scenario.propsDiff))}
</div>
))}
</div>
);
})
.add('substanceOnly', () => (