GithubHelp home page GithubHelp logo

phantom-jasmine's Introduction

Phantom-Jasmine

Phantom-Jasmine is a simple set of two scripts for running your Jasmine Tests via Phantom.js (http://www.phantomjs.org/). The first script lib/console-runner.js is a plugin to Jasmine that outputs test results (with ansi color codes) via console.log (included with a script tag inside TestRunner.html). The second script lib/run_jasmine_test.coffee takes an html file as it's first and only argument and then executes any Jasmine tests that file loads. See below for more detail.

Installation

Assuming you have PhantomJs setup and installed...

sudo npm install phantom-jasmine -g

Running Tests

phantom-jasmine examples/TestRunner.html

On some running OS X you might have to pass in the full url, ex:

phantom-jasmine file://localhost/Users/bob/phantom-jasmine/examples/TestRunner.html 

If everything works you should see output like this in your terminal:

Util : should fail for the example
Error: Expected false to be truthy.

Finished
-----------------
3 specs, 1 failure in 0.024s.

To run your own tests with Phantom-Jasmine just look at TestRunner.html and modify/copy the script tags accordingly.

phantom-jasmine's People

Contributors

jcarver989 avatar layterz avatar vanuan avatar josephwilk avatar nh2 avatar

Watchers

James Cloos avatar wangyue avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.