Export 0.2.1
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.2.0 / node_modules / testswarm / node_modules / request / tests / run.js
1 var spawn = require('child_process').spawn
2   , exitCode = 0
3   ;
4
5 var tests = [
6     'test-body.js'
7   , 'test-cookie.js'
8   , 'test-cookiejar.js'
9   , 'test-defaults.js'
10   , 'test-errors.js'
11   , 'test-form.js'
12   , 'test-follow-all-303.js'
13   , 'test-follow-all.js'
14   , 'test-headers.js'
15   , 'test-httpModule.js'
16   , 'test-https.js'
17   , 'test-https-strict.js'
18   , 'test-oauth.js'
19   , 'test-params.js'
20   , 'test-pipes.js'
21   , 'test-pool.js'
22   , 'test-protocol-changing-redirect.js'
23   , 'test-proxy.js'
24   , 'test-piped-redirect.js'
25   , 'test-qs.js'
26   , 'test-redirect.js'
27   , 'test-timeout.js'
28   , 'test-toJSON.js'
29   , 'test-tunnel.js'
30 ]
31
32 var next = function () {
33   if (tests.length === 0) process.exit(exitCode);
34
35   var file = tests.shift()
36   console.log(file)
37   var proc = spawn('node', [ 'tests/' + file ])
38   proc.stdout.pipe(process.stdout)
39   proc.stderr.pipe(process.stderr)
40   proc.on('exit', function (code) {
41         exitCode += code || 0
42         next()
43   })
44 }
45 next()