Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
afterEach(() => {
if (buffer) buffer.destroy()
if (buffer2) buffer2.destroy()
const watched = pathwatcher.getWatchedPaths()
if (watched.length > 0) {
for (const watchedPath of watched) {
console.error(`WARNING: leaked file watcher for path ${watchedPath}`)
}
pathwatcher.closeAllWatchers()
}
})
ensureNoPathSubscriptions() {
const watchedPaths = pathwatcher.getWatchedPaths();
pathwatcher.closeAllWatchers();
if (watchedPaths.length > 0) {
throw new Error(`Leaking subscriptions for paths: ${watchedPaths.join(", ")}`);
}
}
}
ensureNoPathSubscriptions() {
const watchedPaths = pathwatcher.getWatchedPaths();
pathwatcher.closeAllWatchers();
if (watchedPaths.length > 0) {
throw new Error(`Leaking subscriptions for paths: ${watchedPaths.join(", ")}`);
}
}
}
var ensureNoPathSubscriptions = function() {
let watchedPaths = pathwatcher.getWatchedPaths();
pathwatcher.closeAllWatchers();
if (watchedPaths.length > 0) {
throw new Error(`Leaking subscriptions for paths: ${watchedPaths.join(", ")}`);
}
};