mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-19 21:09:51 +08:00
make test more robust
This commit is contained in:
parent
cb3524ee31
commit
89718eb5e5
@ -27,7 +27,7 @@ tests:
|
||||
- text: The <code>a</code> element should have an <code>href</code> attribute with a value of an empty string <code>""</code>.
|
||||
testString: assert($('a').attr('href') === '');
|
||||
- text: The <code>a</code> element should have a closing tag.
|
||||
testString: assert(code.match(/<\/a>/g) && code.match(/<\/a>/g).length === code.match(/<a href=(''|"")>/g).length);
|
||||
testString: assert((code.match(/<\/a>/g) || []).length === (code.match(/<a[^>] href=(''|"")>/g).length);
|
||||
|
||||
```
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user