Skip to content
This repository was archived by the owner on Jun 16, 2021. It is now read-only.

Latest commit

 

History

History
100 lines (58 loc) · 2.79 KB

mockadapter.md

File metadata and controls

100 lines (58 loc) · 2.79 KB

redux-data-service > MockAdapter

Class: MockAdapter

Hierarchy

MockAdapter

Implements

Index

Properties


Properties

createItem

● createItem: any = stub().callsFake((item) => of$({ ...item, id: faker.random.number().toString(), }))

Implementation of IAdapter.createItem

Defined in Adapters/MockAdapter.ts:7


deleteItem

● deleteItem: any = stub().callsFake((id: string) => of$({ id, dateDeleted: new Date().toISOString(), }))

Implementation of IAdapter.deleteItem

Defined in Adapters/MockAdapter.ts:12


fetchAll

● fetchAll: any = stub().callsFake(() => of$({ items: [] }))

Implementation of IAdapter.fetchAll

Defined in Adapters/MockAdapter.ts:17


fetchItem

● fetchItem: any = stub().callsFake((id: string) => of$({ id }))

Implementation of IAdapter.fetchItem

Defined in Adapters/MockAdapter.ts:18


patchItem

● patchItem: any = stub().callsFake((id: string, item) => of$({ ...item, id }))

Implementation of IAdapter.patchItem

Defined in Adapters/MockAdapter.ts:19


updateItem

● updateItem: any = stub().callsFake((id: string, item) => of$({ ...item, id }))

Implementation of IAdapter.updateItem

Defined in Adapters/MockAdapter.ts:20