mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-21 20:02:55 -05:00
fix(curriculum): Add assertion tests for button click event and changeBackgroundColor function (#55149)
This commit is contained in:
@@ -22,6 +22,8 @@ Once you fix that final bug, the random background color changer will be complet
|
||||
You should not call the `changeBackgroundColor` function. Instead, assign the function reference to the `onclick` property.
|
||||
|
||||
```js
|
||||
assert.strictEqual(typeof btn.onclick, 'function');
|
||||
assert.strictEqual(typeof changeBackgroundColor, 'function');
|
||||
assert.strictEqual(btn.onclick, changeBackgroundColor);
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user