Fallback MockData for Failed Services
npm install sb-fake-jsonA library for mocking data in Sunbird Ed-Portal as Fallback
You can install this library using npm or yarn:
``sh`
npm install sb-fake-json
or
`sh`
yarn add sb-fake-json
In your JavaScript or TypeScript code, you can use this library to access mock data for various purposes. Import it as follows:
`javascript
import * as MockData from 'sb-fake-json';
const response = MockData.getMockResponseData('component_name');
`
`javascript
import { getLocationMockData } from 'sb-fake-json';
const response = getMockResponseData('component_name')
`
- getMockResponseData('explore-page'): Retrieve mock response mock for explore page component.
Add the mock location of data and run node testMockData.js`
Tushar
Mithun Lokanathan
If you have any questions or suggestions, feel free to contact me at
mithun@sedintechnologies.com, tushar@sedintechnologies.com.