File tree 2 files changed +7
-2
lines changed
lib/modules/tests/test-run
src/modules/tests/test-run
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
"use strict" ;
2
+ var twoDigitify = function ( n ) { return n > 9 ? '' + n : '0' + n ; } ;
2
3
function getTestName ( _a ) {
3
4
var tutorial = _a . tutorial , pagePosition = _a . pagePosition ;
4
5
if ( ! tutorial || ! tutorial . name || ! tutorial . version || typeof pagePosition !== 'number' ) {
5
6
console . log ( 'Error creating temporary test name' ) ;
6
7
}
7
- return tutorial . name + "__" + tutorial . version + "__" + pagePosition ;
8
+ return tutorial . name + "__" + tutorial . version + "__" + twoDigitify ( pagePosition + 1 ) ;
8
9
}
9
10
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
10
11
exports . default = getTestName ;
Original file line number Diff line number Diff line change 1
1
import { join } from 'path' ;
2
2
3
+ const twoDigitify = n => n > 9 ? '' + n : '0' + n ;
4
+
3
5
export default function getTestName ( { tutorial, pagePosition} ) : string {
4
6
if ( ! tutorial || ! tutorial . name || ! tutorial . version || typeof pagePosition !== 'number' ) {
5
7
console . log ( 'Error creating temporary test name' ) ;
6
8
}
7
- return `${ tutorial . name } __${ tutorial . version } __${ pagePosition } ` ;
9
+ return `${ tutorial . name } __${ tutorial . version } __${
10
+ twoDigitify ( pagePosition + 1 )
11
+ } `;
8
12
}
You can’t perform that action at this time.
0 commit comments