Permalink
Browse files

added travis ci initial tests

  • Loading branch information...
1 parent 4cf7ad2 commit f0da5afefa94410a858a1ea24d3a1d126ae5b719 @krisk krisk committed Aug 21, 2012
Showing with 66 additions and 1 deletion.
  1. +3 −1 .gitignore
  2. +3 −0 .travis.yml
  3. +22 −0 package.json
  4. +38 −0 test/fiber-test.js
View
@@ -1 +1,3 @@
-docs/
+docs
+node_modules
+npm-debug.log
View
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - 0.6
View
@@ -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"
+ }
+}
View
@@ -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.