Skip to content
This repository was archived by the owner on Aug 9, 2018. It is now read-only.

Commit db8f575

Browse files
author
Martin Atkins
committed
Add an initial simple test and jshint configuration.
1 parent accb6bc commit db8f575

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

.jshintrc

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"node": true,
3+
"esnext": true,
4+
"bitwise": true,
5+
"camelcase": true,
6+
"curly": true,
7+
"eqeqeq": true,
8+
"immed": true,
9+
"indent": 4,
10+
"latedef": true,
11+
"newcap": false,
12+
"noarg": true,
13+
"quotmark": "single",
14+
"undef": true,
15+
"unused": "vars",
16+
"strict": true,
17+
"trailing": true,
18+
"noarg": true,
19+
"nonew": true,
20+
"maxlen": 110,
21+
"white": true
22+
}

package.json

+8
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,17 @@
99
"url": "git://github.com/apparentlymart/angularjs-server.git"
1010
},
1111
"main": "./lib/main",
12+
"scripts": {
13+
"test": "nodeunit tests/",
14+
"lint": "jshint -c .jshintrc lib/* tests/*"
15+
},
1216
"dependencies": {
1317
"angularcontext": "~0.0.4",
1418
"escape-html": "1.0.0",
1519
"express": "~3.4.4"
20+
},
21+
"devDependencies": {
22+
"nodeunit": "*",
23+
"jshint": "2.1.11"
1624
}
1725
}

tests/require.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'use strict';
2+
3+
// This is just a basic test that we can even import the module.
4+
exports.testRequire = function (test) {
5+
var server = require('../lib/main.js');
6+
test.ok(server, 'angularjs-server is truthy');
7+
test.done();
8+
};

0 commit comments

Comments
 (0)