fix(learn): add whitespace check to else-if test (#39555)
This commit is contained in:
		@@ -37,7 +37,7 @@ tests:
 | 
			
		||||
  - text: You should have at least two <code>if</code> statements
 | 
			
		||||
    testString: assert(code.match(/if/g).length > 1);
 | 
			
		||||
  - text: You should have closing and opening curly braces for each <code>if else</code> code block.
 | 
			
		||||
    testString: assert(code.match(/if\s*\((.+)\)\s*\{[\s\S]+\}\s*else if\s*\((.+)\)\s*\{[\s\S]+\}\s*else\s*\{[\s\S]+\s*\}/));
 | 
			
		||||
    testString: assert(code.match(/if\s*\((.+)\)\s*\{[\s\S]+\}\s*else\s+if\s*\((.+)\)\s*\{[\s\S]+\}\s*else\s*\{[\s\S]+\s*\}/));
 | 
			
		||||
  - text: <code>testElseIf(0)</code> should return "Smaller than 5"
 | 
			
		||||
    testString: assert(testElseIf(0) === "Smaller than 5");
 | 
			
		||||
  - text: <code>testElseIf(5)</code> should return "Between 5 and 10"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user