Skip to content

Commit 2a66840

Browse files
joseph-normanpmcnr-hx
authored andcommitted
- Updated .travis.yml to run a build against Node 4 LTS
- Updated package.json to collect latest jsonapi-server version 3.0.2 - Updated test/proxy.js to check if what we're attempting to require from the jsonapi-server's test suite is a directory or not. Decided to omit the latter files from require (as fixtures are used in the higher level tests so not needed when requiring).
1 parent b0e5497 commit 2a66840

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ language: node_js
22
services:
33
- mongodb
44
node_js:
5-
- "6"
5+
- 4
6+
- 6
67
script: "npm run $TEST_STEP"
78
env:
89
matrix:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"blanket": "1.2.3",
3737
"coveralls": "2.13.1",
3838
"eslint": "4.2.0",
39-
"jsonapi-server": "3.0.1",
39+
"jsonapi-server": "3.0.2",
4040
"mocha": "3.4.2",
4141
"mocha-lcov-reporter": "1.3.0",
4242
"mocha-performance": "0.1.1",

test/proxy.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,17 @@ module.children[2].exports = function() {
1818
var fs = require("fs");
1919
var path = require("path");
2020
var base = path.join(__dirname, "../node_modules/jsonapi-server/test");
21+
2122
fs.readdirSync(base).forEach(function(filename) {
2223
try {
23-
require(path.join(base, filename));
24+
var filePath = path.join(base, filename)
25+
26+
// If the current file we're attempting to read is a directory, don't require it.
27+
if (fs.lstatSync(filePath).isDirectory()) {
28+
29+
} else {
30+
require(filePath)
31+
}
2432
} catch(e) { }
2533
});
2634

0 commit comments

Comments
 (0)