We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 004a46c commit 16eacfaCopy full SHA for 16eacfa
test/lib-caronte-test.js
@@ -0,0 +1,27 @@
1
+var caronte = require('../lib/caronte'),
2
+ expect = require('expect.js');
3
+
4
+describe('lib/caronte.js', function() {
5
+ describe('#createProxyServer', function() {
6
+ it('should throw without options', function() {
7
+ var error;
8
+ try {
9
+ caronte.createProxyServer();
10
+ } catch(e) {
11
+ error = e;
12
+ }
13
14
+ expect(error).to.be.an(Error);
15
+ })
16
17
+ it('should return an object otherwise', function() {
18
+ var obj = caronte.createProxyServer({
19
+ target: 'http://www.google.com:80'
20
+ });
21
22
+ expect(obj.web).to.be.a(Function);
23
+ expect(obj.ws).to.be.a(Function);
24
+ expect(obj.listen).to.be.a(Function);
25
26
27
+});
test/truth-test.js
0 commit comments