fix(challenge): allow new line in linear-gradient formatting (#35435)

* fix(challenge): allow new line in linear-gradient formatting

* fix(challenge): update test with suggested changes

* fix(challenge): update test to use computed style
This commit is contained in:
lasjorg
2019-03-04 02:32:41 +01:00
committed by Tom
parent 345e3b1c89
commit 25ea44edf5

View File

@ -26,7 +26,7 @@ Use a <code>linear-gradient()</code> for the <code>div</code> element's <code>ba
```yml
tests:
- text: The <code>div</code> element should have a <code>linear-gradient</code> <code>background</code> with the specified direction and colors.
testString: assert(code.match(/background:\s*?linear-gradient\(35deg,\s*?(#CCFFFF|#CFF),\s*?(#FFCCCC|#FCC)\);/gi), 'The <code>div</code> element should have a <code>linear-gradient</code> <code>background</code> with the specified direction and colors.');
testString: assert($('div').css('background-image').match(/linear-gradient\(35deg, rgb\(204, 255, 255\), rgb\(255, 204, 204\)\)/gi));
```