File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
client/src/templates/Challenges/projects/backend Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,13 @@ const mapStateToProps = createSelector(
52
52
tests : Test [ ] ,
53
53
isChallengeCompleted : boolean ,
54
54
isSignedIn : boolean ,
55
- testsRunningSelector : boolean
55
+ testsRunning : boolean
56
56
) => ( {
57
57
tests,
58
58
output,
59
59
isChallengeCompleted,
60
60
isSignedIn,
61
- testsRunningSelector
61
+ testsRunning
62
62
} )
63
63
) ;
64
64
@@ -217,6 +217,7 @@ class BackEnd extends Component<BackEndProps> {
217
217
updateSolutionFormValues
218
218
} = this . props ;
219
219
220
+ const hasTests = tests . length > 0 ;
220
221
const isChallengeComplete = tests . every ( test => test . pass && ! test . err ) ;
221
222
const submitBtnLabel : string = ! isChallengeComplete
222
223
? `${ t ( 'buttons.run-test-2' ) } ${ testsRunning ? ' ...' : '' } `
@@ -260,16 +261,18 @@ class BackEnd extends Component<BackEndProps> {
260
261
buttonLabel = { submitBtnLabel }
261
262
/>
262
263
< br />
263
- < Output
264
- defaultOutput = { `/**
264
+ { hasTests && (
265
+ < Output
266
+ defaultOutput = { `/**
265
267
*
266
268
* ${ t ( 'learn.test-output' ) }
267
269
*
268
270
*
269
271
*/` }
270
- output = { output }
271
- />
272
- < TestSuite tests = { tests } />
272
+ output = { output }
273
+ />
274
+ ) }
275
+ { hasTests && < TestSuite tests = { tests } /> }
273
276
< Spacer />
274
277
</ Col >
275
278
</ Row >
You can’t perform that action at this time.
0 commit comments