Skip to content

lzfrnd/test-react-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Challenge [You have 30 minutes to complete this challenge]:
  As a Senior Web SDK Developer, you will need to demonstrate your skills in creating a simple Web SDK that interacts with a mock API. Your task is to build a small JavaScript library that can fetch data from a public API and expose it in a way that is easy for developers to use.
Task:
  Create a JavaScript module that fetches data from the JSONPlaceholder API (a free fake online REST API for testing and prototyping).
  The module should have a method getPosts that retrieves a list of posts and returns it as a promise.
  Implement error handling to manage any potential issues during the fetch operation.
  Write a simple test case using Jest to verify that the getPosts method works correctly.
Requirements:
  Use JavaScript (ES6+)
  Use Fetch API for making HTTP requests
  Implement error handling
  Use Jest for testing
Technologies
  JavaScript (ES6+)
  Jest (for testing)
  Fetch API
  External Resources
  JSONPlaceholder API Documentation
  Jest Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published