Fix typo in test. Colors -> classes (#21108)

This commit is contained in:
mail-liam 2018-11-06 08:23:01 +11:00 committed by Paul Gamble
parent 4c059aef35
commit 7f4b440f64

View File

@ -26,10 +26,10 @@ Note that we've already included both the jQuery library and the Animate.css lib
```yml
tests:
- text: Use the jQuery <code>addClass&#40&#41</code> function to give the classes <code>animated</code> and <code>bounce</code> to your <code>button</code> elements.
testString: assert($("button").hasClass("animated") && $("button").hasClass("bounce"), 'Use the jQuery <code>addClass&#40&#41</code> function to give the classes <code>animated</code> and <code>bounce</code> to your <code>button</code> elements.');
- text: Only use jQuery to add these colors to the element.
testString: assert(!code.match(/class.*animated/g), 'Only use jQuery to add these colors to the element.');
- text: 'Use the jQuery <code>addClass&#40&#41</code> function to give the classes <code>animated</code> and <code>bounce</code> to your <code>button</code> elements.'
testString: 'assert($("button").hasClass("animated") && $("button").hasClass("bounce"), "Use the jQuery <code>addClass&#40&#41</code> function to give the classes <code>animated</code> and <code>bounce</code> to your <code>button</code> elements.");'
- text: Only use jQuery to add these classes to the element.
testString: 'assert(!code.match(/class.*animated/g), "Only use jQuery to add these classes to the element.");'
- text: Your jQuery code should be within the <code>$(document).ready();</code> function.
testString: assert(code.match(/\$\(document\)\.ready\(function.*(\s|\n)*.*button.*.addClass.*\);/g), 'Your jQuery code should be within the <code>$(document).ready();</code> function.');