In this exercise, I will write a few practical tests for JavaScript functions using the Jest library. I will make sure to follow the AAA pattern to make my tests easier for other developers to read and understand. I will also try to use the TDD approach in practice.

Overview

Testing Practices

To get a local copy up and running follow these simple example steps. (NPM)

  1. Ope your terminal

  2. Navigate to the directory where you want your project cloned

  3. Clone the project using git clone or just copy the command below:

    git clone https://github.com/didierganthier/getting-started-jest.git

  4. Open the project with your IDE. I use Visual Studio Code

  5. Run npm install to get the dependencies

    not sure how to use npm? Read this.

  6. Run the tests using this command:

    npm test

not sure how to use npm? Read this.

Prerequisites

  • Having an IDE .
  • Having Git installed and configured.

Setup

  • Clone the repository using Git.
  • Open the project folder in your IDE.
  • Get the dependecies

Authors

👤 Author1

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc

📝 License

This project is MIT licensed.

You might also like...

It is a solo Project and In this repo I try to build a E-Commerce full-stack website with MERN stack technologies. For Practice purpose.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Aug 3, 2022

Restructure my Awesome books app code. The goal is to make it more organized by using modules and also practice the ES6 syntax.

Awesome Book In this project, I rebuild a basic website that allows users to add/remove books from a list using ES6 Built With HTML CSS Javascript Get

Aug 15, 2022

In this project, I restructure my previous Awesome books app code. The goal is to practice ES6 syntax and also make the code more organized by using ES6 modules.

Awesome Books In this project, I will restructure my previous Awesome books app code. The goal is to make it more organized by using modules. I will a

Aug 23, 2022

In this project, you will restructure your Awesome books app code. The goal is to make it more organized by using modules and also practice the ES6 syntax.

Awesome-books-with-ES6 In this project, I restructured Awesome books app code. The goal is to make it more organized by using modules and also practic

Sep 16, 2022

Flipkart Clone using MERN Stack with proper File Structure and also follow MVC architecture. You can view live app.

Flipkart Clone using MERN Stack with proper File Structure and also follow MVC architecture.  You can view live app.

Flipkart Clone MERN APP Dhaval Patel's Flipkart Clone is done with top-notch features for the entrepreneur startups like Flipkart. It has strong authe

Dec 29, 2022

In this project, you will restructure your Awesome books app code. The goal is to make it more organized by using modules. You will also practice the ES6 syntax that you have learned.

Awesome books: with ES6 In this project, you will restructure your Awesome books app code. The goal is to make it more organized by using modules. You

Oct 10, 2022

Reference for How to Write an Open Source JavaScript Library - https://egghead.io/series/how-to-write-an-open-source-javascript-library

Reference for How to Write an Open Source JavaScript Library The purpose of this document is to serve as a reference for: How to Write an Open Source

Dec 24, 2022

🥾 A simple way to do testing AWS Services and Jest or Serverless and Jest

jest-localstack-preset Install Install via yarn or npm $ yarn add https://github.com/thadeu/jest-localstack-preset.git or $ npm i https://github.com/t

Oct 1, 2022

Node js package makes creating node jd dependincies files like Controllers,Entities and Repositories easier by executing a few instructions

Node js package makes creating node jd dependincies files like Controllers,Entities and Repositories easier by executing a few instructions

Nodejs Studio Node js package makes creating node js project dependincies files like Controllers,Entities and Repositories easier by executing a few i

Oct 12, 2022
Comments
  • Write tests

    Write tests

    Write tests

    Checklist

    • [x] I have read this repository's contribution guidelines.
    • [x] My pull request has a descriptive title (not a vague title like Update index.MD)
    • [x] My pull request targets the main branch of this project.
    • [x] I added relevant documentation for all the files I changed

    This PR writes several tests and runs them using the Jest framework

    What changes have been made?

    The author of these changes is the owner of the repo @didierganthier

    opened by didierganthier 0
Owner
Didier Peran Ganthier
Full-Stack Software Developer with a love for React, Flutter, Rust, and TypeScript. I love riddles, challenges, and philosophy. Open to new opportunities.
Didier Peran Ganthier
In this project I write the test for several functions and used the TDD with Jest and JavaScript.

JavaScript-Testing-with-Jest npm init -y npm install --save-dev jest Once installed, you should see it in already created Json file Change Jest Script

Ben Kiboma Omayio 2 Jun 11, 2022
🚀👩‍🚀This repo contains all the files to follow along and implement a MultiChain NFT MarketPlace! Be sure to watch my Youtube tutorials so you can learn and follow along!

Multi-Chain NFT Marketplace ?? ??‍?? This repo contains all the files to follow along and implement a MultiChain NFT MarketPlace! Be sure to watch my

Net2Dev 30 Jan 5, 2023
Repositório do curso de TDD do Manguinho (Node + TS + SOLID + TDD + Clean Architecture)

Curso Rodrigo Manguinho - NodeJs, Typescript, TDD, DDD, Clean Architecture e SOLID Curso tem como objetivo aprender de verdade a criar uma API complet

Glaucia Lemos 4 Dec 15, 2022
This repository serves as a starter kit for doing simple TDD exercise

This repository serves as a starter kit for doing simple TDD exercise

adylanrff 3 Feb 19, 2022
Awesome-Books project uses practical tests for JavaScript/Html and CSS functions.

Awesome-Books project uses practical tests for JavaScript/Html and CSS functions. The project presents a basic website that allows users to add/remove books from a list.

Vahan Kh. 5 Jan 31, 2022
Follow along with blog posts, code samples, and practical exercises to learn how to build serverless applications from your local Integrated development environment (IDE).

Getting started with serverless This getting started series is written by the serverless developer advocate team @AWSCloud. It has been designed for d

AWS Samples 55 Dec 28, 2022
Compile-time tests for types. Useful to make sure types don't regress into being overly-permissive as changes go in over time.

expect-type Compile-time tests for types. Useful to make sure types don't regress into being overly-permissive as changes go in over time. Similar to

Misha Kaletsky 82 Jan 8, 2023
A free e-library for developer to read and upload ebooks they would like to share with the community and help other developers grow.

Techlib ?? Techlib A free e-library for developer to read and upload ebooks they would like to share with the community and help other developers grow

Paschal 20 Dec 15, 2022
Learn GraphQL by building a blogging engine. Create resolvers, write schemas, write queries, design the database, test and also deploy.

GraphQL Blog graphqlblog.com Learn GraphQL by building a blogging engine. Create resolvers, write schemas, write queries, design the database, test an

GraphQLApps 6 Aug 17, 2022