Skip to content

Commit c82f980

Browse files
committed
minor code style tweaks
1 parent 1dd6d5b commit c82f980

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

profile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ events.on('results', function (data) {
105105
if (console.profileEnd) {
106106
console.profileEnd();
107107
}
108+
108109
console.log('RESULTS:', data.stats);
109110

110111
if (process.exit) {

types/make.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ function generatePrefixed(prefix) {
5858

5959
children += generatePrefixed(parts);
6060
}
61+
6162
if (output === '') {
6263
return children;
6364
}
65+
6466
return 'export namespace ' + ['test'].concat(prefix).join('.') + ' {\n' + output + '}\n' + children;
6567
}
6668

@@ -70,13 +72,17 @@ function writeFunction(name, args) {
7072

7173
function verify(parts, asPrefix) {
7274
const has = arrayHas(parts);
75+
7376
if (has('only') + has('skip') + has('todo') > 1) {
7477
return false;
7578
}
79+
7680
const beforeAfterCount = has('before') + has('beforeEach') + has('after') + has('afterEach');
81+
7782
if (beforeAfterCount > 1) {
7883
return false;
7984
}
85+
8086
if (beforeAfterCount === 1) {
8187
if (has('only')) {
8288
return false;
@@ -107,18 +113,22 @@ function isSorted(a) {
107113
return false;
108114
}
109115
}
116+
110117
return true;
111118
}
112119

113120
// Returns the type name of for the test implementation
114121
function testType(parts) {
115122
const has = arrayHas(parts);
116123
let type = 'Test';
124+
117125
if (has('cb')) {
118126
type = 'Callback' + type;
119127
}
128+
120129
if (!has('beforeEach') && !has('afterEach')) {
121130
type = 'Contextual' + type;
122131
}
132+
123133
return type;
124134
}

0 commit comments

Comments
 (0)