Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sane

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sane - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

test/plugin_watcher.js

5

index.js

@@ -8,3 +8,6 @@ 'use strict';

function sane(dir, options) {
if (options.poll) {
if (options.watcher) {
var WatcherClass = require(options.watcher);
return new WatcherClass(dir, options);
} else if (options.poll) {
return new PollWatcher(dir, options);

@@ -11,0 +14,0 @@ } else if (options.watchman) {

2

package.json
{
"name": "sane",
"version": "1.2.0",
"version": "1.3.0",
"description": "Sane aims to be fast, small, and reliable file system watcher.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -75,2 +75,23 @@ var os = require('os');

describe('sane plugin', function () {
beforeEach(function () {
this.watcher = sane(testdir, {
glob: '**/file_1',
watcher: './test/plugin_watcher',
});
});
afterEach(function (done) {
this.watcher.close(done);
});
it('uses the custom plugin watcher', function (done) {
this.watcher.on('is-test-plugin', function () {
done();
});
});
});
describe('sane(file)', function() {

@@ -77,0 +98,0 @@ beforeEach(function () {

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