Skip to content

Nik Nak Studio boilerplate and starter kit for Jest, a NodeJS/Javascript testing tool based upon Jasmine.

License

Notifications You must be signed in to change notification settings

ignaciosegura/jest_testing_boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SIASAR API test suite

Ignacio Segura (LinkedIn)

While the full SIASAR project, including these tests, is published as open source on GitLab (SIASAR on GitLab), we are publishing here a short, simplified version of our testing suite for educational purposes.

If you want to know more, I wrote an article on the subject on Medium: Facebook Jest, the JS testing tool for people who hate writing tests

INSTALL:

npm install

RUN:

npm run test-prod -> run tests against Staging server
npm run test-dev -> run tests against Dev server
npm run test-local -> run tests against Local

REQUIRES:

NodeJS (https://nodejs.org/en/) > 8.3.0

Mac users are recommended to use Homebrew (https://brew.sh/) to Install NodeJS instead:

brew install node

WRITING TESTS

Just use the provided examples in testfolder for a starting point. Jest has a auto-discovery mechanism, so it will take any file named *.test.js in any folder and launch it.

Jest launches tests in parallel, every test inside their own clean environment. No information is shared between tests. If you need some global variable to be available across all tests, you can use __GLOBAL__, as specified in package.json.

About

Nik Nak Studio boilerplate and starter kit for Jest, a NodeJS/Javascript testing tool based upon Jasmine.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published