Skip to content

Setup a fast TDD env on browser with mocha and chai.

Notifications You must be signed in to change notification settings

fakiolinho/js-browser-tdd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-browser-tdd

Setup a fast TDD env on browser with mocha and chai.

Installation

git clone https://github.com/fakiolinho/js-browser-tdd.git
npm i && npm start

Tested Method

Function to test if a number is prime:

function isPrime(x) {
	if (! Number.isInteger(x)) {
	  	return false;
	}
	    
	if (x < 2) {
	  	return false;
	}
	    
	for (let i = 2; i <= Math.sqrt(x); i++) {
	  	if (x % i === 0) {
	    	return false;
	  	}
	}
	    
	return true;
}

About

Setup a fast TDD env on browser with mocha and chai.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages