Skip to content

sergiocruz/sails-unit-test

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
api
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Unit testing SailsJS

##Setting up testing environment This tutorial shows you how to get your testing environment setup. It also goes through how to run your first SailsJS unit test Sails with Mocha and how to generate code coverage with Istanbul:
http://blog.sergiocruz.me/unit-test-sailsjs-with-mocha-and-instanbul-for-code-coverage

##What are SailsJS Services and how to use them The SailsJS documentation does not seem to cover services much... that's why I put a simple guide together explaining what SailsJS Services are and how to use them:
http://blog.sergiocruz.me/sailsjs-services-how-to-use-them-in-your-controllers

##How to mock services in your controller Mocking services in SailsJS is actually pretty simple once you get the hang of it. The problem is actually getting to the point where you get the hang of it. That's exactly why I wrote up a tutorial on how to mock services when testing your controllers:
http://blog.sergiocruz.me/unit-testing-sails-js-how-to-mock-sailsjs-services-in-controllers

About

Showing how to unit test SailsJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published