Comparing version 0.8.0 to 0.8.1
@@ -268,3 +268,3 @@ var fs = require('fs'); | ||
if (error) { | ||
if (error.code === 'ENOENT') { | ||
if (error.code === 'ENOENT' || (platform === 'win32' && error.code === 'EPERM')) { | ||
found = true; | ||
@@ -271,0 +271,0 @@ callback(file); |
{ | ||
"name": "sane", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"description": "Sane aims to be fast, small, and reliable file system watcher.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -193,12 +193,13 @@ var os = require('os'); | ||
var testfile = jo(subdir, 'file_1'); | ||
var i = 0; | ||
var actualFiles = {}; | ||
var expectedFiles = {}; | ||
expectedFiles[path.relative(testdir, subdir)] = true; | ||
expectedFiles[path.relative(testdir, testfile)] = true; | ||
this.watcher.on('ready', function() { | ||
this.watcher.on('add', function(filepath) { | ||
actualFiles[filepath] = true; | ||
// win32 order is not guaranteed and events may leak between tests | ||
if (expectedFiles[filepath]) { | ||
actualFiles[filepath] = true; | ||
} | ||
if (Object.keys(actualFiles).length === 2) { | ||
// win32 order is not guaranteed | ||
var expectedFiles = {}; | ||
expectedFiles[path.relative(testdir, subdir)] = true; | ||
expectedFiles[path.relative(testdir, testfile)] = true; | ||
assert.deepEqual( | ||
@@ -205,0 +206,0 @@ expectedFiles, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22477
665
5