github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

technoweenie / ntest

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 20
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Switch Branches (1)
    • master ✓
  • Switch Tags (0)
  • Branch List
Sending Request…

a little node.js test framework i wrote to learn the ropes. — Read more

  Cancel

  Cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

remove extra puts 
technoweenie (author)
Sun Jan 17 10:41:47 -0800 2010
commit  75ac56b6ab1e299bf9d69e682aa0deab282f82d4
tree    6dd61f3733807c29c104cf588f6ae33c31a00f11
parent  75ccd49409aafe28c8eb71eb7eaf2ba0d56cf011
ntest /
name age
history
message
file LICENSE Fri Jan 08 15:59:47 -0800 2010 initial commit [technoweenie]
file README.md Fri Jan 08 16:15:02 -0800 2010 linebreaks [technoweenie]
directory lib/ Fri Jan 15 06:50:03 -0800 2010 run tests as they are created by default [technoweenie]
file ntest.js Fri Jan 08 15:59:47 -0800 2010 initial commit [technoweenie]
directory test/ Sun Jan 17 10:41:47 -0800 2010 remove extra puts [technoweenie]
README.md

ntest

A little test framework I wrote to get a handle on this whole asynchronous javascript thing. I don't really know what I'm doing here, other than trying to mold javascript to fit my tiny ruby brain.

Installation

There's no packaging system for node.js yet, so I've just been creating symlinks in my ~/.node_libraries path.

$ ln -s /path/to/ntest/lib ~/.node_libraries/ntest

Usage

Mix the library into GLOBAL and start defining tests. Use whatever asserts library you like.

process.mixin(GLOBAL, require('ntest'));

var assert = require('assert') # comes with node.js

describe("an empty array")
  it("has zero length", function() {
    assert.equal(0, [].length);
  })

Influences

Ryan Tomayko's test lib for bert:
http://github.com/rtomayko/node-bertrpc/blob/master/test/test.js

Dan Webb and FreeRange's nodetest:
http://github.com/freerange/nodetest/blob/master/nodetest.js

Copyright

Copyright (c) 2010 rick. See LICENSE for details.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server
ZW5kZW5yYWhheXU5QGdtYWlsLmNvbQ==