1 |
|
2 | fs = require 'fs'
|
3 | should = require 'should'
|
4 | each = require 'each'
|
5 | dojo = if process.env.DOJO_COV then require '../lib-cov/dojo' else require '../lib/dojo'
|
6 |
|
7 | describe 'Release', ->
|
8 | it 'should download specific release', (next) ->
|
9 | @timeout 0
|
10 | middleware = dojo version: '1.5.0'
|
11 | req = url: 'http://localhost'
|
12 | res = {}
|
13 | middleware req, res, (err) ->
|
14 | should.not.exist err
|
15 | each([
|
16 | '/tmp/dojo-release-1.5.0/dojo'
|
17 | '/tmp/dojo-release-1.5.0/dijit'
|
18 | '/tmp/dojo-release-1.5.0/dojox'
|
19 | ])
|
20 | .on 'item', (path, next) ->
|
21 | fs.stat path, (err, stats) ->
|
22 | should.not.exist err
|
23 | stats.isDirectory().should.be.ok
|
24 | next()
|
25 | .on 'both', next
|