New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@skroutz/has-event

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@skroutz/has-event

JavaScript test support utility for jQuery events

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
378
increased by84.39%
Maintainers
1
Weekly downloads
 
Created
Source

hasEvent

JavaScript test support utility for jQuery events

Build Status

A way to detect the presence of jQuery events is currently a wontfix, thus this helper.

Installation

npm install @skroutz/has-event

or

bower install hasEvent (Deprecated!!!)

Don't forget to include the lib itself, located in dist/has_event.js

Usage

The examples below use chai should style assertions.

  // Native event
  $('.foo').hasEvent('click', someHandler).should.be.true

  // Custom event
  $('.foo').hasEvent('custom', someHandler).should.be.true

  // Delegated event
  $('body').hasEvent('click', '.foo .bar', somehandler).should.be.true

  // 'Live' event
  $(document).hasEvent('click', '.foo .bar', someHandler).should.be.true

  // Event on window
  $(window).hasEvent('scroll', someHandler).should.be.false

Tests

Currently there are tests against jQuery versions 1.7 up to 2.0.3

Browse the builds here

Author

Dimitris Zorbas (@zorbash)

Licence

Copyright (c) 2013 Dimitris Zorbash Licensed under the MIT license.

Keywords

FAQs

Package last updated on 22 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc