How to use the pathwatcher.File.prototype 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 / atom / spec / theme-manager-spec.js View on Github external
beforeEach(function () {
        const {File} = require('pathwatcher')
        spyOn(File.prototype, 'on').andCallFake(function (event) {
          if (event.indexOf('contents-changed') > -1) {
            throw new Error('Unable to watch path')
          }
        })
        spyOn(atom.themes, 'loadStylesheet').andReturn('')
        atom.notifications.onDidAddNotification(addErrorHandler = jasmine.createSpy())
      })

pathwatcher

Watch files and directories for changes

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis

Similar packages