mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-27 19:00:42 -04:00
fix(curriculum): allows tests to accept event delegation solution (#59693)
This commit is contained in:
@@ -84,8 +84,7 @@ assert.isNotEmpty(buttonElements);
|
||||
buttonElements.forEach(button => button.classList.add('filled'));
|
||||
|
||||
buttonElements.forEach(button => {
|
||||
button.dispatchEvent(new Event('click'));
|
||||
button.dispatchEvent(new Event('change'));
|
||||
button.dispatchEvent(new Event('click', { bubbles: true }));
|
||||
assert.isFalse(button.classList.contains('filled'));
|
||||
assert.equal(button.innerHTML.charCodeAt(0), 9825);
|
||||
});
|
||||
@@ -100,8 +99,7 @@ assert.isNotEmpty(buttonElements);
|
||||
buttonElements.forEach(button => button.classList.remove('filled'));
|
||||
|
||||
buttonElements.forEach(button => {
|
||||
button.dispatchEvent(new Event('click'));
|
||||
button.dispatchEvent(new Event('change'));
|
||||
button.dispatchEvent(new Event('click', { bubbles: true }));
|
||||
assert.isTrue(button.classList.contains('filled'));
|
||||
assert.equal(button.innerHTML.charCodeAt(0), 10084);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user