node.js
This file
Path
spec/node.js
67 lines · 1.3 KiB · JavaScript
Last changed by
Started Session pluginvisionmediabefore adoption7238afb
History of this fileTake it
Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption6f7141a
lines 1–19why, one step back12require.paths.unshift('spec', 'lib', 'spec/lib', 'spec/support/libxmljs')3require("jspec")4require("express")5require("express/spec")67quit = process.exit8print = puts910readFile = function(path) {11 var result12 require('posix')13 .cat(path, "utf8")14 .addCallback(function(contents){ result = contents })15 .addErrback(function(){ throw new Error("failed to read file `" + path + "'") })16 .wait()17 return result18}19Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoptione125ae2
lines 20–35why, one step back20function run(specs) {21 specs.forEach(function(spec){22 JSpec.exec('spec/spec.' + spec + '.js')23 })24}2526specs = {27 independant: [28 'core',29 'routing',30 'helpers',31 'request',32 'mime',33 'static',34 'collection',35 'plugins',Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption704c933
line 36why, one step back36 'plugins.cache',Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoptione125ae2
lines 37–44why, one step back37 'plugins.view',38 'plugins.common-logger',39 'plugins.content-length',40 'plugins.method-override',41 'plugins.body-decoder',42 'plugins.redirect',43 'plugins.hooks',44 'plugins.cookie',Started Session pluginvisionmediabefore adoption7238afb
line 45why, one step back45 'plugins.session',Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoptione125ae2
lines 46–67why, one step back46 ],47 dependant: [48 'element-collection'49 ]50}5152switch (process.ARGV[2]) {53 case 'independant':54 run(specs.independant)55 break56 case 'dependant':57 run(specs.dependant)58 break59 case 'all':60 run(specs.independant)61 run(specs.dependant)62 break63 default: 64 run([process.ARGV[2]])65}6667JSpec.run({ reporter: JSpec.reporters.Terminal, failuresOnly: true }).report()