Skip to content

Instantly share code, notes, and snippets.

@cloudhead
Forked from Marak/gist:405858
Created May 19, 2010 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cloudhead/405867 to your computer and use it in GitHub Desktop.
Save cloudhead/405867 to your computer and use it in GitHub Desktop.
vows.describe('format.js library').addVows({
"toNumber(42)": {
"on an instance of Number": {
topic: new Number( 42 ),
"can format strict number":function( n ){
assert.equal( true, n instanceof Number );
}},
"on a number literal": {
topic: 42,
"can format loose number":function( n ){
assert.equal( true, n instanceof Number);
}},
"on a string": {
topic: '42',
"can format string as number":function( n ){
assert.equal( true, n instanceof Number );
}}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment