Socket
Socket
Sign inDemoInstall

isolated

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isolated

isolated provider one-time folders for unit tests.


Version published
Weekly downloads
28
decreased by-63.64%
Maintainers
1
Weekly downloads
 
Created
Source

isolated

isolated provider one-time folders for unit tests.

Installation

$ npm install isolated

Quick Start

Using isolated is easy. All you need to do is to add a reference to it within your Node.js application:

var isolated = require('isolated');

Then you can use it within your tests. In its simplest form, isolated provides a one-time folder for your test and guarantees to clean up later.

test('...', function (done) {
  isolated(function (err, directory) {
    // ...
  });
});

Additionally, you may want to specify a file or a directory that isolated shall copy to the one-time directory before running your test.

test('...', function (done) {
  isolated('foo.txt', function (err, directory) {
    // ...
  });
});

If you need to copy multiple files or directories, specify an array instead of a single item.

Then you can use it within your tests. In its simplest form, isolated provides a one-time folder for your test and guarantees to clean up later.

test('...', function (done) {
  isolated([ 'foo.txt', 'bar.txt' ], function (err, directory) {
    // ...
  });
});

Running the tests

isolated has been developed using TDD. To run the tests, go to the folder where you have installed isolated to and run npm test. You need to have mocha installed.

$ npm test

Additionally, this module can be built using Grunt. Besides running the tests, Grunt also analyses the code using JSHint. To run Grunt, go to the folder where you have installed isolated and run grunt. You need to have grunt-cli installed.

$ grunt

FAQs

Package last updated on 24 Apr 2013

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc