New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

bulkhead-test

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bulkhead-test

A functional testing suite for Bulkhead services.

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

bulkhead-test

A functional testing suite for Bulkhead services. This package uses:

  • Sails as the web application
  • Mocha as the test harness
  • Barrels for fixture loading
  • Supertest for REST testing

Quick start

npm install bulkhead-test

Configuration

  • All tests need to be in JavaScript and in a folder called test in the package root with a .js extension.
  • All fixtures need to be in JSON format and in a folder called test/fixtures in the package root with a .json extension. (See Barrels for more details)
  • All fixture names need to be consisting of the package name, an underscore, and the model name in lower case. (Example: If your package is called testPackage and your model is called Account.js, the fixture needs to be called testPackage_account.json)
  • You will need to lift the sails application before tests are ran. This can be done with the following:
var suite = require('bulkhead-test');
  
describe('A test category', function() {

  suite.lift();  // You lift sails during in your suite description

  describe('Some test', function() {
  	it('should test', function(done) {
      /* ... */
      done();
  });
});

To perform REST tests against the application, do the following:

var suite = require('bulkhead-test');
  
describe('A test category', function() {
  suite.lift();
  describe('A category breakdown', function() {
    it('should do REST testing', function(done) {
      // Using suite.rest() will allow you to utilize the Supertest API
      suite.rest()
        .get('/')
        .end(function(err, res) {
          done();
        }
      );
    })
  });
});

For more help with REST testing, check out supertest.

Keywords

sailsjs

FAQs

Package last updated on 15 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts