mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-19 21:09:51 +08:00
fix(curriculum): allows tests to accept event delegation solution (#59693)
This commit is contained in:
parent
0aefe7a551
commit
26ab080ada
@ -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);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user