fix: simplify challenge testString (#37826)

This commit is contained in:
Randell Dawson
2019-12-07 12:47:08 -08:00
committed by Manish Giri
parent 623c08cbfa
commit cb3524ee31

View File

@ -33,8 +33,7 @@ tests:
- text: The variable <code>difference</code> should be equal to 12.
testString: assert(difference === 12);
- text: You should only subtract one number from 45.
testString: assert(/var\s*difference\s*=\s*45\s*-\s*[0-9]*;(?!\s*[a-zA-Z0-9]+)/.test(code));
testString: assert(/difference=45-33;?/.test(code.replace(/\s/g, '')));
```
</section>