Skip to content
Myr

spec.node.js

This file

Path

spec/spec.node.js

39 lines · 957 bytes · JavaScript

Last changed by

merged from upstreamcsausdevbefore adoptiona3acc21

History of this file

Take it

merged from upstreamcsausdevbefore adoptiona3acc21

line 1why, one step back
1require.paths.unshift("./spec/lib", "./lib");

got the tests to run, but not passcsausdevbefore adoption8b34960

line 2why, one step back
2process.mixin(GLOBAL, require("sys"))

Added node.js JSpec testing supportvisionmediabefore adoption2852524

line 3why, one step back
3

Simplified the test runnercsausdevbefore adoption29fbb44

lines 4–5why, one step back
4require("jspec")
5require("express")

merged from upstreamcsausdevbefore adoptiona3acc21

line 6why, one step back
6require("express/spec/mocks")

Simplified the test runnercsausdevbefore adoption29fbb44

line 7why, one step back
7

merged from upstreamcsausdevbefore adoptiona3acc21

lines 8–13why, one step back
8var posix = require('posix')
910quit = process.exit11print = puts1213readFile = function(path) {

got the tests to run, but not passcsausdevbefore adoption8b34960

line 14why, one step back
14 var promise = posix.cat(path, "utf8")

merged from upstreamcsausdevbefore adoptiona3acc21

line 15why, one step back
15 var result = ''

Added node.js JSpec testing supportvisionmediabefore adoption2852524

lines 16–17why, one step back
16 promise.addErrback(function(){ throw "failed to read file `" + path + "'" })
17 promise.addCallback(function(contents){

merged from upstreamcsausdevbefore adoptiona3acc21

line 18why, one step back
18 result = contents

Added node.js JSpec testing supportvisionmediabefore adoption2852524

line 19why, one step back
19 })

Simplified the test runnercsausdevbefore adoption29fbb44

line 20why, one step back
20 promise.wait()

merged from upstreamcsausdevbefore adoptiona3acc21

line 21why, one step back
21 return result

Added node.js JSpec testing supportvisionmediabefore adoption2852524

lines 22–23why, one step back
22}
23

merged from upstreamcsausdevbefore adoptiona3acc21

lines 24–37why, one step back
24if (process.ARGV[2])
25 JSpec.exec('spec/spec.' + process.ARGV[2] + '.js') 26else27 JSpec28 .exec('spec/spec.core.js')29 .exec('spec/spec.routing.js')30 .exec('spec/spec.mocks.js')31 .exec('spec/spec.modules.js')32 .exec('spec/spec.mime.js')33 .exec('spec/spec.cookie.js')34 .exec('spec/spec.session.js')35 .exec('spec/spec.view.js') 36 .exec('spec/spec.async.js')37JSpec.run({ formatter: JSpec.formatters.Terminal, failuresOnly: true })

Simplified the test runnercsausdevbefore adoption29fbb44

line 38why, one step back
38JSpec.report()

Added node.js JSpec testing supportvisionmediabefore adoption2852524

line 39why, one step back
39