update tests
This commit is contained in:
parent
876c208da3
commit
1e82ed7383
4
test.js
4
test.js
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue