https://github.com/naxmefy/sails-shoulda
https://github.com/naxmefy/sails-shoulda
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/naxmefy/sails-shoulda
- Owner: naxmefy
- License: mit
- Created: 2015-05-06T10:40:24.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-18T13:34:40.000Z (about 10 years ago)
- Last Synced: 2025-01-16T01:16:06.742Z (5 months ago)
- Language: JavaScript
- Size: 270 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
sails-shoulda
=====[](https://travis-ci.org/Ninevillage/sails-shoulda)
Collection of method for sailsjs testing. Provides common shortcuts.
# Installation
```
$ npm install --save-dev sails-shoulda
```# Usage
At first require it in your ```bootstrap.test.js```.
```JavaScript
require("sails-shoulda");
```Next, use it in your tests.
```JavaScript
describe("Model: User", function() {
context('attribute', function() {
context('email', function() {
it('should be required', function(done) {
User.should.validate_require_of('email', done);
});
it('should be unique', function(done) {
User.should.validate_unqiue_of('email', done);
});
});
});
});
```