npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

greyhound

v0.0.3

Published

End-to-end browser testing framework

Readme

Greyhound (alpha)

An end-to-end testing framework for node

Installation

The following instructions will only work after the first proper release

  1. Install the Selenium Chrome Driver
  2. Create a NPM module: mkdir my-e2e-testing && cd my-e2e-testing && npm init
  3. Install Greyhound: npm i --save greyhound
  4. Check that it works: greyhound -h

Getting Started

  1. Create the required directories mkdir -p test-scripts/pages
  2. Create a page object:
# test/scripts/pages/google/home.coffee
{Page} = require "greyhound"

class GoogleHome extends Page

  configure: ->
    @options.url = "http://www.google.com"

  searchBox: ->
    @findElement css: "input[name='q']"

  searchFor: (query) ->
    @searchBox().sendKeys "#{query}\n"

module.exports = GoogleHome

Or in Javascript:

// test/scripts/pages/google/home.js
var Page = require("greyhound").Page,
    util = require("util");

function GoogleHome() {
  this.constructor.super_.apply(this, arguments);
}

util.inherits(GoogleHome, Page);

util._extend(GoogleHome.prototype, {

  configure: function () {
    this.options.url = "http://www.google.com";
  },

  searchBox: function () {
    this.findElement({css: "input[name='q']"});
  },

  searchFor: function (query) {
    this.searchBox().sendKeys(query + "\n");
  }
  
});

module.exports = GoogleHome;

Or in LiveScript:

# test/scripts/pages/google/home.ls
{Page} = require \greyhound

class GoogleHome extends Page

  configure: ->
    @options.url = \http://www.google.com

  search-box: ->
    @find-element css: \input[name:'q']

  search-for: (query) ->
    @search-box!send-keys "#query\n"

module.exports = GoogleHome
  1. Create your first test script:
# test-scripts/google-search.coffee
{TestScript} = require "greyhound"
GoogleHome = require "./pages/google/home"

class GoogleSearch extends TestScript

  configure: ->
    @options.scriptName = "Google Search"

  execute: ->
    homePage = @page GoogleHome
    homePage.visit()
    homePage.searchFor "Greyhound"

module.exports = GoogleSearch

Or in JavaScript:

// test-scripts/google-search.js
var TestScript = require("greyhound").TestScript,
    GoogleHome = require("./pages/google/home"),
    util = require("util");

function GoogleSearch() {
  this.constructor.super_.apply(this, arguments);
}

util.inherits(GoogleSearch, TestScript);

util._extend(GoogleSearch.prototype, {

  configure: function () {
    this.options.scriptName = "Google Search";
  },

  execute: function () {
    var homePage = this.page(GoogleHome);
    homePage.visit();
    homePage.searchFor("Greyhound");
  }
  
});

module.exports = GoogleSearch;

Or in LiveScript:

# test-scripts/google-search.ls
require! {
  greyhound.TestScript
  \./pages/google/home
  util
}

class GoogleSearch

  configure: ->
    @options.script-name = 'Google Search'

  execute: ->
    home-page = @page GoogleHome
    home-page.visit!
    home-page.search-for \Greyhound

module.exports = GoogleSearch

4. Run your script `$ greyhound google-search`
5. View the report in a browser

Contributing
------------

### Setup

Here's my recommended set-up while developing on this project:

1. Make sure you have the required packages installed for [Growl](https://github.com/visionmedia/node-growl).
2. Fork/clone the project somewhere locally `git clone [email protected]:MyMedsAndMe/greyhound.js.git`
3. Install all dependencies and globally link it `sudo npm link`
4. Run the builder `npm run watch-compile`. As the project is built in CoffeeScript, this will continually compile the project to JavaScript, watching the files for any changes.
5. Open another terminal and run the tests `npm run watch-test`. This will run the tests everytime you change a test file.
6. If you want to try Greyhound in another project, while still developing on it, create your project and link your local version of Greyhound: `npm link greyhound` (make sure you have followed step 3 first).

### Coding standards

- All files to be named in lowercase and the words to be separated with hyphens.
- Variables, properties, methods and functions to be named in camelcase, first letter must be lowercase.
- Classes to be named in camelcase, first letter must be uppercase.
- Use CoffeeScript's style of string concatenation.
- Leave an empty line at the end of every file.
- Functions to have a gap between the properties and the arrow. Ie `(prop, prop2) ->`
- Functions without properties don't include the paranthesis `->`
- Be as clean as possible, make your code semantic and make your code readable without comments. Ie, use lots of nicely named functions instead.