#!/usr/bin/env node

var sys = require('sys')

require('../lib/js.io/packages/jsio')


jsio.path.shared = '../js/'
jsio.path.server = '../js/'
jsio.path.client = '../js/'
jsio.path.test = '../'

jsio('import client.fin') // makes fin globally accesible
jsio('import test.tests')
jsio('from shared.javascript import blockCallback')
jsio('import base')

// base.logging.setProduction(true) // kill all logging

var onDone = blockCallback(function() {
	sys.puts("Tests done")
	process.exit()
})

fin.connect(function() {
	for (var testName in test.tests) {
		sys.puts(testName)
		test.tests[testName](onDone.addBlock())
	}
})

// var redis = require('../../lib/redis-node-client/lib/redis-client')
// var finServer = new server.Server(redis, server.Connection)
// 
// // for browser clients
// finServer.listen('csp', { port: 5555 }) 
// 
// // for robots
// finServer.listen('tcp', { port: 5556, timeout: 0 }) 
// 
// 
// 
// require('../lib/fin/lib/js.io/packages/jsio')
// 
// 
// jsio('import tasks.robots.BurndownRobot')
// 
// fin.connect(function() {
// 	var burndownRobot = new tasks.robots.BurndownRobot()
// })

@@ -83,115 +83,120 @@
 ')%0A%0A
-%0A
 jsio.
-path.shared = '../js/'%0Ajsio.path.server = '../js/'%0Ajsio.path.client = '../js/'%0Ajsio.path.test = '../'
+addPath('js', 'shared')%0Ajsio.addPath('js', 'server')%0Ajsio.addPath('js', 'client')%0Ajsio.addPath('.', 'test')
 %0A%0Ajs
@@ -213,19 +213,19 @@
  client.
-fin
+api
 ') // ma

Make run_tests.js startup properly with new jsio module (the tests are still not passing though)