This repository was archived by the owner on Apr 8, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
lib/modules/tests/test-run
src/modules/tests/test-run Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 11"use strict" ;
2+ var twoDigitify = function ( n ) { return n > 9 ? '' + n : '0' + n ; } ;
23function 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}
910Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
1011exports . default = getTestName ;
Original file line number Diff line number Diff line change 11import { join } from 'path' ;
22
3+ const twoDigitify = n => n > 9 ? '' + n : '0' + n ;
4+
35export 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}
You can’t perform that action at this time.
0 commit comments