Jest
  • 01 May 2023
  • 1 Minute to read
  • Dark
    Light

Jest

  • Dark
    Light

Article Summary

Overview

Jest is a JavaScript testing framework designed to ensure correctness of any JavaScript codebase
It works with projects using: Babel, TypeScript, Node, React, Angular, Vue and more!.
It allows you to write tests with an approachable, familiar and feature-rich API that gives you results quickly. Jest is well-documented, requires little configuration and can be extended to match your requirements.

Prerequisites

Need to install Node And NPM [Recommended latest version]

Steps

  1. Run the below command to install the required packages available in package.json which include “jest” also
    bash 
    npm i
    
  2. Enter your "MailId" in pCloudy_Username="Enter your Email-id" in "Singledevice.test.js".
  3. Enter your "ApiKey" in pCloudy_ApiKey="Enter your API Key" in "Singledevice.test.js".
  4. Open the terminal where the project is located and run the script by running the following command in your terminal :
bash 
npm test singleDevice.test.js

The complete sample and documentation are available in the pCloudy GitHub Repository
https://github.com/pankyopkey/pCloudy-sample-projects


Was this article helpful?

What's Next