Giter Site home page Giter Site logo

foounit's Introduction

foounit Project status

A functionally scoped BDD style test framework that runs everywhere.

Key features:

  • Asyncronous test running
  • Out of the box support for multiple javascript host environments: node.js, major browsers, Adobe AIR, The Ruby Racer
  • BDD style test running
  • A simple API

Contrived Example

var MyLib = foounit.require(':src/my_lib');

foounit.add(function (kw){ with(kw){
  describe('when something happens', function (){
    var myLib;
    before(function (){
      myLib = new MyLib();
    });

    it('does something awesome', function (){
      expect(myLib.someFunc()).to(equal, 'foo');
    });
  });
}});

Quick Start Guide

Quick Start for Browser Testing

  1. Create a directory to put your tests
  2. Drop in the example suite
  3. Start a web server
  4. Point your web browser at your server location

Quick Start for Node Testing

  1. TODO

Quick Start for Shared Environment Testing

  1. TODO

Do we run everywhere yet? - NO

Browser

  • Firefox
    • Firefox 3.x - YES
    • Firefox 4.x - YES
  • Chrome - YES
  • Safari - YES
  • Internet Explorer
    • IE6 - YES
    • IE7 - YES
    • IE8 - YES
    • IE9 - ?

Comand line

  • Node.js - YES
  • Rhino - NO
  • spidermonkey - ??

Other

  • Adobe AIR - NO
  • The Ruby Racer - NO
  • Webkit Mobile - NO

Known Issues

  • Stack trace reporting in the browser doesn't really help that much.
  • XhrLoadingStrategy is not good enough. We lose stack trace info in the eval.
  • The UI for browser based running is not where I want it to be yet.

About

TODO

Other Alternatives

foounit isn't for you?

There's a lot of great unit testing frameworks for javascript these days. It's more important that people are testing their code than it is that people use foounit.

Some notable alternatives are:

  • jasmine (This is also a rewrite of Screw Unit)
  • shoulda.js (BDD with different syntax)
  • vows (BDD with different syntax)
  • logan (Cross environment unit testing)

Greetz

  • mde - for providing good ideas
  • peterbraden - for identifying problems with foounit's first iteration
  • nathansobo - for rewriting Screw Unit while I was at Grockit which got me this far
  • Alex Russell and James Burke - for being a sounding board for synchronous loader ideas
  • jasmine for beating me to the punch :) and also providing a better API than I originally had

foounit's People

Contributors

foobarfighter avatar peterbraden avatar polotek avatar

Stargazers

 avatar

Watchers

 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.