fix(curriculum): allow hex triplets for red and green colors to pass tests (#38523)
This commit is contained in:
@ -29,11 +29,11 @@ tests:
|
||||
- text: Your <code>h1</code> element with the text <code>I am red!</code> should be given the <code>color</code> red.
|
||||
testString: assert($('.red-text').css('color') === 'rgb(255, 0, 0)');
|
||||
- text: The <code>hex code</code> for the color red should be used instead of the word <code>red</code>.
|
||||
testString: assert(code.match(/\.red-text\s*?{\s*?color:\s*?#FF0000\s*?;\s*?}/gi));
|
||||
testString: assert(code.match(/\.red-text\s*?{\s*?color:\s*?(#FF0000|#F00)\s*?;\s*?}/gi));
|
||||
- text: Your <code>h1</code> element with the text <code>I am green!</code> should be given the <code>color</code> green.
|
||||
testString: assert($('.green-text').css('color') === 'rgb(0, 255, 0)');
|
||||
- text: The <code>hex code</code> for the color green should be used instead of the word <code>green</code>.
|
||||
testString: assert(code.match(/\.green-text\s*?{\s*?color:\s*?#00FF00\s*?;\s*?}/gi));
|
||||
testString: assert(code.match(/\.green-text\s*?{\s*?color:\s*?(#00FF00|#0F0)\s*?;\s*?}/gi));
|
||||
- text: Your <code>h1</code> element with the text <code>I am dodger blue!</code> should be given the <code>color</code> dodger blue.
|
||||
testString: assert($('.dodger-blue-text').css('color') === 'rgb(30, 144, 255)');
|
||||
- text: The <code>hex code</code> for the color dodger blue should be used instead of the word <code>dodgerblue</code>.
|
||||
|
Reference in New Issue
Block a user