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

jasmine-integration

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

jasmine-integration

Jasmine Integration

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

jasmine-integration

Integration tests with jasmine. Visit node-todo for an example

Usage

First you need to visit a url and probably wait until the page is loaded:

  beforeEach(function(done) {
    page = visit("/");
    page.ready(done);
  });

The page object supports clicking on elements:

  page.click("#selector")

And filling in input fields:

  page.fill_in("#selector", "Some text");

Async behavior with waitFor:

  beforeEach(function(done) {
	page.click("button");
	page.waitFor(function() {
	  return someCondition() == true;
    }, done);
  });

Installation

  • Install grunt cli: npm install grunt-cli -g

  • In package.json append to your devDependencies:

    "jasmine-integration": "0.0.1"
    
  • Install node modules: npm install

  • Add the following to your Gruntfile:

    grunt.loadNpmTasks('jasmine-integration');
    

Basic setup for jasmine

Assuming test files are called *Spec.js and the app is a node app. Add the following to config/jasmine.yml

spec_files:
  - "**/*[Ss]pec.{js,coffee}"

application_port: 8080

server_command: "node server.js"

Running tests

  • To run tests in the browser grunt jasmine:server

  • To run tests in headless mode grunt jasmine:server:ci

FAQs

Package last updated on 11 Jun 2014

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