Skip to content

Commit 428c98e

Browse files
committed
adding params test file
1 parent 97a85e0 commit 428c98e

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

test/params.js

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
var expect = require('chai').expect;
2+
var ldnode = require('../index');
3+
var supertest = require('supertest');
4+
5+
describe('params', function () {
6+
7+
describe('uri', function () {
8+
9+
describe('not passed', function () {
10+
11+
var ldp = ldnode.createServer({
12+
base: __dirname
13+
});
14+
ldp.listen(3456);
15+
16+
it('should be the proxy value if exist', function (done) {
17+
done();
18+
})
19+
20+
it('should be localhost if no proxy', function (done) {
21+
done();
22+
})
23+
})
24+
25+
describe('passed', function() {
26+
var ldp = ldnode.createServer({
27+
uri: 'http://example.com',
28+
base: __dirname
29+
});
30+
ldp.listen(3456);
31+
it ('should not use proxy', function (done) {
32+
done();
33+
})
34+
})
35+
})
36+
37+
describe('base', function () {
38+
39+
describe('not passed', function () {
40+
it ('should fallback on current working directory', function (done) {
41+
done()
42+
})
43+
})
44+
45+
describe('passed', function() {
46+
})
47+
})
48+
})

0 commit comments

Comments
 (0)