1
Fork 0

update tests

This commit is contained in:
Conduitry 2018-10-23 12:55:20 -04:00
parent 876c208da3
commit 1e82ed7383
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ function getEvents(watch) {
const event = `${isNew ? 'new' : 'updated'} ${
stats.isFile() ? 'file' : ''
}${stats.isDirectory() ? 'directory' : ''} ${path}`;
if (events.has(event)) {
if (stats.isFile() && events.has(event)) {
throw new Error(`Duplicate event: ${event}`);
}
events.add(event);
@ -34,7 +34,7 @@ function getEvents(watch) {
const event = `deleted ${stats.isFile() ? 'file' : ''}${
stats.isDirectory() ? 'directory' : ''
} ${path}`;
if (events.has(event)) {
if (stats.isFile() && events.has(event)) {
throw new Error(`Duplicate event: ${event}`);
}
events.add(event);