Skip to content

Commit abff181

Browse files
committed
Added smoke test target to Jakefile
1 parent d8609e0 commit abff181

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

Jakefile.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
});
5757

5858
desc("Test everything");
59-
task("test", ["testServer", "testClient"]);
59+
task("test", ["testServer", "testClient", "testSmoke"]);
6060

6161
desc("Test server code");
6262
task("testServer", ["nodeVersion", TEMP_TESTFILE_DIR], function() {
@@ -68,6 +68,11 @@
6868
testacular.runTests(SUPPORTED_BROWSERS, complete, fail);
6969
}, {async: true});
7070

71+
desc("End-to-end smoke tests");
72+
task("testSmoke", function() {
73+
nodeunit.runTests(smokeTestFiles(), complete, fail);
74+
}, {async: true});
75+
7176
desc("Deploy to Heroku");
7277
task("deploy", ["default"], function() {
7378
console.log("1. Make sure 'git status' is clean.");
@@ -115,6 +120,12 @@
115120
function serverTestFiles() {
116121
var testFiles = new jake.FileList();
117122
testFiles.include("src/server/**/_*_test.js");
123+
testFiles = testFiles.toArray();
124+
return testFiles;
125+
}
126+
127+
function smokeTestFiles() {
128+
var testFiles = new jake.FileList();
118129
testFiles.include("src/_*_test.js");
119130
testFiles = testFiles.toArray();
120131
return testFiles;
@@ -123,6 +134,7 @@
123134
function nodeLintFiles() {
124135
var javascriptFiles = new jake.FileList();
125136
javascriptFiles.include("*.js");
137+
javascriptFiles.include("build/util/*.js");
126138
javascriptFiles.include("src/server/**/*.js");
127139
javascriptFiles.include("src/*.js");
128140
return javascriptFiles.toArray();

build/util/version_checker.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
" [" + expectedString + "], but was [" + actualString + "].");
99
}
1010

11-
var expected = parseNodeVersion("expected Node version", expectedString);
12-
var actual = parseNodeVersion("Node version", actualString);
11+
var expected = parseNodeVersion("expected Node version", expectedString, fail);
12+
var actual = parseNodeVersion("Node version", actualString, fail);
1313

1414
if (!process.env.loose) {
1515
if (actual[0] !== expected[0] || actual[1] !== expected[1] || actual[2] !== expected[2]) {
@@ -23,7 +23,7 @@
2323
}
2424
};
2525

26-
function parseNodeVersion(description, versionString) {
26+
function parseNodeVersion(description, versionString, fail) {
2727
var versionMatcher = /^v(\d+)\.(\d+)\.(\d+)(\-|$)/; // v[major].[minor].[bugfix]
2828
var versionInfo = versionString.match(versionMatcher);
2929
if (versionInfo === null) fail("Could not parse " + description + " (was '" + versionString + "')");

wwp.png

-54.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)