How to use the pathwatcher.closeAllWatchers function in pathwatcher

To help you get started, we’ve selected a few pathwatcher examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github atom / text-buffer / spec / text-buffer-io-spec.js View on Github external
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()
    }
  })
github nylas-mail-lives / nylas-mail / packages / client-app / spec / n1-spec-runner / master-after-each.es6 View on Github external
ensureNoPathSubscriptions() {
    const watchedPaths = pathwatcher.getWatchedPaths();
    pathwatcher.closeAllWatchers();
    if (watchedPaths.length > 0) {
      throw new Error(`Leaking subscriptions for paths: ${watchedPaths.join(", ")}`);
    }
  }
}
github nylas-mail-lives / nylas-mail / spec / n1-spec-runner / master-after-each.es6 View on Github external
ensureNoPathSubscriptions() {
    const watchedPaths = pathwatcher.getWatchedPaths();
    pathwatcher.closeAllWatchers();
    if (watchedPaths.length > 0) {
      throw new Error(`Leaking subscriptions for paths: ${watchedPaths.join(", ")}`);
    }
  }
}
github nylas-mail-lives / nylas-mail / spec / spec-helper.es6 View on Github external
var ensureNoPathSubscriptions = function() {
  let watchedPaths = pathwatcher.getWatchedPaths();
  pathwatcher.closeAllWatchers();
  if (watchedPaths.length > 0) {
    throw new Error(`Leaking subscriptions for paths: ${watchedPaths.join(", ")}`);
  }
};

pathwatcher

Watch files and directories for changes

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Similar packages