elbehary01 / simple-jest-test-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jest-example

a simple example for testing a function

installation

install the json package stuff npm i then use npm run test to start the test

idea

try to run a jest test for a function accepet 2 strings for a version.

Motivatoin

I wrote this a function to check the version of an App. I try to improve it in the futuer that it works with the version of the user when the the user version is old give the user a message that he should update his App.

module

Try to change the values of the functoin but untill now it Hard coded

like:
versionCompare('1.1.1', '1.1.1');
versionCompare('1.1.1', '1.0.1');
versionCompare('1.1.0', '1.1.1');

About


Languages

Language:JavaScript 80.0%Language:HTML 20.0%