Skip to content

Commit ac978bb

Browse files
author
Joshua Baert
committed
Finished return object from test
1 parent 0e2d176 commit ac978bb

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

controllers/testCtrl.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function nester(arr) {
7575
let passCount = 0;
7676
console.log(arr.length);
7777
for (let i = arr.length - 1; i >= 0; i--) {
78-
if(arr[i]) {
78+
if (arr[i]) {
7979
if (arr[i].type == 'test') {
8080
testCount += 1;
8181
if (arr[i].passed == true) passCount += 1
@@ -122,14 +122,14 @@ function testRunner(script, test) {
122122
if (stdErr) {
123123
console.log('stdErr');
124124
console.log(stdErr);
125-
} else {
126-
let output = stdOut.split(/\n/g);
127-
for (let i = output.length - 1; i >= 0; i--) if (output[i] === '') output.splice(i, 1);
128-
let newArr = objectifer(output);
129-
newArr = nester(newArr);
130-
defer.resolve(newArr);
131-
return
132125
}
126+
let output = stdOut.split(/\n/g);
127+
for (let i = output.length - 1; i >= 0; i--) if (output[i] === '') output.splice(i, 1);
128+
let newArr = objectifer(output);
129+
newArr = nester(newArr);
130+
defer.resolve(newArr);
131+
return
132+
133133
}
134134
);
135135

@@ -138,7 +138,6 @@ function testRunner(script, test) {
138138

139139

140140

141-
142141
module.exports = {
143142
testKata: (req, res, next) => {
144143
let body = req.body;

0 commit comments

Comments
 (0)