Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jellyfish

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jellyfish

A framework for launching environments and running JS

  • 0.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Jellyfish -- Browser launcher and Javascript execution engine.

Jellyfish bridges the gap between server and client side javascript by allowing control of all the major browsers from a node script.

From running unit tests across platforms, to automating browser based workflows, jellyfish aims to free javascript from the confines of a single environment.

Install

npm install jellyfish

Or from source:

git clone git://github.com/admc/jellyfish.git 
cd jellyfish
npm link .

Platforms

MacOSX 10.6
Ubuntu 10.x

Browsers

Firefox 3.x, 4b
Google Chrome
Safari (MacOSX)
Selenium 2/WebDriver
Sauce Labs OnDemand
Zombie (headless node.js browser)

(Provides hooks to Saucelabs OnDemand platform allowing execution in all major browsers.)

Usage

npm require

var jellyfish = require('jellyfish'),
  , assert = require('assert');

init a browser (createFirefox, createChrome, createZombie)

var browser = jellyfish.createFirefox();

goto a web site

browser.go("http://www.jelly.io")

verify the title

.js("document.title", function(o) {
  assert.equal(o.result, "Jelly.io: Jellyfish Home")
})

run some local javascript

.jsfile("./test.js", function(o) {
  assert.equal(o.result, "alerted: Jellyfish local file loaded successfully!")
})

run some remote javascript, stop the browser, then exit

.jsurl("http://jelly.io/test.js", function(o) { 
  assert.equal(o.result, "alerted: Jellyfish remote file loaded successfully!")
  browser.stop(function() {
    setTimeout(process.exit(), 2000);
  })
})

Reporting

var jellyfish = require('jellyfish')

var browser = jellyfish.createFirefox(function(){
  browser.couch({uri:'my couch url', port:5984, db:'mydbname'})
});

// You can just do browser.couch() and it will default to:
// {uri:'localhost', port:5984, db:'jellyfish'}

// Do stuff and it will automatically get reported to couch!

~/.jfrc

{
  , "firefox": "/path/to/binary" //binary path to firefox if you want to set it manually
  , "chrome": "path/to/binary" //binary path
  , "safari": "path/to/binary" //binary path
  , "interface": "Airport" // required for safari testing (proxy setting)
  , "username": "username" //sauce labs username
  , "accessKey": "apikey" //sauce labs apikey
  , "browserName": "firefox" //sauce labs default browser
  , "version": "4.0" // sauce labs default browser version
}

FAQs

Package last updated on 09 Dec 2011

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