Giter VIP home page Giter VIP logo

testqa's Introduction

Basic JavaScript testing framework

This is a basic testing framework implemented for the following functions that are to be used;-

  • describe: This function should take a string testSuiteName and a callback function, and define a group of related test cases.

  • it: This function defines a single test case in a test suite and is called within a describe's callback func. It takes in a string testCaseName and its own callback func, which makes one or more calls to expect.

  • expect: This function defines a single check in a test case and is called within an it's callback func. It takes in an arbitrary parameter actual and returns an object with the following three functions that are used to compare actual to other values:-

  • expect(actual).toExist(): This function checks that actual is neither null nor undefined.

  • expect(actual).toBe(expected): This function checks that actual is strictly equal to expected.

  • expect(actual).toBeType(type): This function checks that actual is of the type type, which can be any string returned by the typeof operator.

How to run this repository

  • After cloning this repository, cd into the project repository and trigger npm i to install all the needed dependencies.

  • Then trigger npm start to get the application running.

Screenshot of the output on the console

No Arbitrary Error Screenshot Arbitrary Error Screenshot
console console2

Contributor(s)

testqa's People

Contributors

mherman22 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.