Skip to content

Commit 97a85e0

Browse files
committed
adding template tests for params, fixing error if no arg is provided
1 parent f013adb commit 97a85e0

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ var debug = require('./logging').settings;
99
module.exports = params;
1010

1111
function params(argv) {
12+
argv = argv || {};
1213
var opts = {};
1314

1415
// From input

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
"scripts": {
5858
"start": "node bin/ldnode.js",
5959
"test": "DEBUG='ldnode:*' ./node_modules/mocha/bin/mocha ./test/*.js",
60-
"test-acl": "./node_modules/mocha/bin/mocha ./test/secure-test.js"
60+
"test-acl": "./node_modules/mocha/bin/mocha ./test/secure-test.js",
61+
"test-params": "./node_modules/mocha/bin/mocha ./test/params.js"
6162
},
6263
"bin": {
6364
"ldnode": "./bin/ldnode.js"

test/secure-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ var $rdf = require('rdflib');
55
var request = require('request');
66
var S = require('string');
77
var supertest = require('supertest');
8+
var ldnode = require('../index');
89

910
describe('ACL', function() {
1011
this.timeout(10000);
@@ -13,7 +14,6 @@ describe('ACL', function() {
1314
var ns = require('../vocab/ns.js').ns;
1415
var address = 'https://localhost:3456/test/';
1516

16-
var ldnode = require('../index');
1717
var ldp = ldnode.createServer({
1818
uri: address,
1919
base: __dirname,

0 commit comments

Comments
 (0)