Simplified the test runner
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by csausdev · committed by TJ Holowaychuk · parent c89a114 · Browse files · 4 files·+22 added−37 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+22 added−37 removed
- tests:+15 added−35 removed
- other:+7 added−2 removed
Provenance
- Commit
fd27636- Tree
2e36949- Author
csausdev <gareth.jones@sensis.com.au>- Committer
TJ Holowaychuk <tj@vision-media.ca>- Parent
c89a114
4 files changed+22 added−37 removed
modified:lib/express.core.js+2 added-2 removed
1 2 // Express - Core - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)3+process.mixin(GLOBAL, require("sys"));3-4+ 5 (function(){6 var http = require("http");6- process.mixin(GLOBAL, require("sys"));7 8 Express = { 9 version : '0.0.1',10 utilities : {},728 unmodified linesadded:lib/express.js+5 added
12345require("./express.core")require("./express.cookie")require("./express.mime")require("./express.session")require("./express.view")modified:spec/spec.cookie.js+4 added-2 removed
13 unmodified lines14151617181819202122232415 unmodified lines40414243424413 unmodified lines end describe 'onRequest' it 'should parse cookie fields' get('foo', function(){ cookie('q') }) get('foo', function() { utilities.cookie('q') }) response = get('foo', { headers : [['Cookie', 'path=/; q=something; domain=.example.net']] }) response.body.should.eql 'something' end end15 unmodified lines end end end endendNo newline at end of fileendmodified:spec/spec.node.js+11 added-33 removed
122343456789710111211121314151617181920212213141516172627282930313233343518192021222324252644454647484950272829require.paths.unshift("../jspec-2.11.2/lib", "./lib");process.mixin(GLOBAL, require("sys"))var posix = require("posix");__loading__ = []__loadDelay__ = 800
require("jspec")require("express")require("express.mocks")
var posix = require("posix");readFile = function(path, callback) { __loading__.push(path) var promise = posix.cat(path, "utf8") promise.addErrback(function(){ throw "failed to read file `" + path + "'" }) promise.addCallback(function(contents){ setTimeout(function(){ if (__loading__[0] == path) __loading__.shift(), callback(contents) else setTimeout(arguments.callee, 50) }, 50) }) }
load = function(path) { readFile(path, function(contents){ eval(contents) callback(contents) }) promise.wait()}
load('../jspec-2.11.2/lib/jspec.js')load('lib/express.core.js')load('lib/express.mocks.js')load('lib/express.mime.js')load('lib/express.cookie.js')load('lib/express.view.js')load('lib/express.session.js')
setTimeout(function(){ JSpecJSpec .exec('spec/spec.core.js') .exec('spec/spec.routing.js') .exec('spec/spec.mocks.js') .exec('spec/spec.modules.js') .exec('spec/spec.mime.js') .exec('spec/spec.cookie.js') .exec('spec/spec.session.js') .exec('spec/spec.view.js') setTimeout(function(){ JSpec.run({ formatter : JSpec.formatters.Terminal, failuresOnly : true }) setTimeout(function() { JSpec.report() }, __loadDelay__ / 3) }, __loadDelay__ / 3)}, __loadDelay__ / 3)JSpec.run({ formatter : JSpec.formatters.Terminal, failuresOnly : true })JSpec.report()