Skip to content

Instantly share code, notes, and snippets.

@Sequoia
Created May 9, 2012 02:39
Show Gist options
  • Save Sequoia/2641378 to your computer and use it in GitHub Desktop.
Save Sequoia/2641378 to your computer and use it in GitHub Desktop.
jasmine-node test spec causes node to throw
var Afonigizer = require('../afonigizer.js').Afonigizer;
var _ = require('../node_modules/underscore/underscore.js');
describe("The Afonigizer", function(){
'use strict';
var afonigizer, i;
beforeEach(function(){
afonigizer = new Afonigizer(Math);
});
describe("Load test libraries",function(){
it("should load underscore",function(){
expect(typeof $).toEqual('function');
});
it("should not die on an unloaded library",function(){
expect(typeof $).not.toEqual('function');
});
});
describe("Aliasing name parts",function(){
var nameParts = [];
beforeEach(function(){
//generate some nameParts
//we'll just use the index nums as names
for(i = 0; i < 100; i++){
nameParts[i] = {};
}
});
it("Should return the same name part alias consistently",function(){
//generate a bunch of names and aliases
//nameParts[i] =
//}
//setup aliases
nameParts.forEach(function(elem,index,names){
//aliasParts.push( afonigizer.aliasPart(i,firstName) );
});
});
});
});
@Sequoia
Copy link
Author

Sequoia commented May 9, 2012

Without "should not die on an unloaded library" test, tests run fine & without error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment