Skip to content

Commit

Permalink
added travis ci initial tests
Browse files Browse the repository at this point in the history
  • Loading branch information
krisk committed Aug 21, 2012
1 parent 4cf7ad2 commit f0da5af
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
@@ -1 +1,3 @@
docs/
docs
node_modules
npm-debug.log
3 changes: 3 additions & 0 deletions .travis.yml
@@ -0,0 +1,3 @@
language: node_js
node_js:
- 0.6
22 changes: 22 additions & 0 deletions package.json
@@ -0,0 +1,22 @@
{
"author": "Kirollos Risk <kirollos@gmail.com>",
"name": "Fiber.js",
"description": "Lightweight JavaScript inheritance library",
"version": "1.0.3",
"homepage": "https://github.com/linkedin/Fiber",
"main": "fiber.js",
"repository": {
"type": "git",
"url": "git://github.com/linkedin/Fiber.git"
},
"scripts": {
"test": "vows --spec"
},
"engines": {
"node": ">= 0.4"
},
"dependencies": {},
"devDependencies": {
"vows": "0.6.x"
}
}
38 changes: 38 additions & 0 deletions test/fiber-test.js
@@ -0,0 +1,38 @@
var assert = require('assert'),
vows = require('vows'),
Fiber = require('../fiber');

var SuperClass = Fiber.extend(function() {
return {
init: function(name) {
this.name = name;
}
}
});

var SubClass = SuperClass.extend(function( base ) {
return {
init: function(name) {
base.init.call(this, name);
}
}
});

vows.describe('Basic Instantiation').addBatch({
'When initializing a base class': {
topic: function() {
return new SuperClass('super');
},
'result should have a name': function (result) {
assert.equal(result.name, 'super');
}
},
'When initializing a subclass': {
topic: function() {
return new SubClass('sub');
},
'result should have a name': function (result) {
assert.equal(result.name, 'sub');
}
}
}).export(module);

0 comments on commit f0da5af

Please sign in to comment.