Skip to content

Commit 2113897

Browse files
committed
set test names to end in two digits for file organization
1 parent 6e43528 commit 2113897

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
"use strict";
2+
var twoDigitify = function (n) { return n > 9 ? '' + n : '0' + n; };
23
function getTestName(_a) {
34
var tutorial = _a.tutorial, pagePosition = _a.pagePosition;
45
if (!tutorial || !tutorial.name || !tutorial.version || typeof pagePosition !== 'number') {
56
console.log('Error creating temporary test name');
67
}
7-
return tutorial.name + "__" + tutorial.version + "__" + pagePosition;
8+
return tutorial.name + "__" + tutorial.version + "__" + twoDigitify(pagePosition + 1);
89
}
910
Object.defineProperty(exports, "__esModule", { value: true });
1011
exports.default = getTestName;
+5-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import { join } from 'path';
22

3+
const twoDigitify = n => n > 9 ? '' + n : '0' + n;
4+
35
export default function getTestName({tutorial, pagePosition}): string {
46
if (!tutorial || !tutorial.name || !tutorial.version || typeof pagePosition !== 'number') {
57
console.log('Error creating temporary test name');
68
}
7-
return `${tutorial.name}__${tutorial.version}__${pagePosition}`;
9+
return `${tutorial.name}__${tutorial.version}__${
10+
twoDigitify(pagePosition + 1)
11+
}`;
812
}

0 commit comments

Comments
 (0)