* Added initial version of spy helper
* add missing backslashes
* update to check for line start
* change __fixtures file extensions to .ts from .tsx
* add to exports and add documentation
* add tests
* update event.preventDefault() test
* Ensure the test only checks the state name variable is present, it doesn't have to be the only word
* Emphasise in the test the wording that the instructions use
* Added note detail and event.preventDefault() test
* Replaced lookbehinds with matches
* Reverted to using \s instead of .
Now only matches if event.preventDefault() call is the only thing in the comment. This avoids matching note comments like "need to call event.preventDefault() here"
* Added optional semicolons for both comment checks
* Added trailing whitespace for line comment check
* Switched to match length checks
This should be equivalent to the two original lookbehinds
* Removed unnecessary .length check
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
* Updated the handleClick method to use updater function in react tutorial english
* Update comments in the seed code of curriculum/challenges/english/03-front-end-libraries/react/render-conditionally-from-props.md
Changing comments in the seed code according to the list of [agreed-upon comments](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/dictionaries/english/comments.json)
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
* fix(curriculum): check if count gets incremented by function
* update text
* Update regex to look for whitespace
* look for function globally
* Apply suggestions from gikf
Co-authored-by: gikf <60067306+gikf@users.noreply.github.com>
Co-authored-by: gikf <60067306+gikf@users.noreply.github.com>
* fix: fluid containers test not specific
* fix: fluid containers test not specific
* fix: update fluid containers test not specific
Co-authored-by: Shaun Hamilton <51722130+ShaunSHamilton@users.noreply.github.com>
Co-authored-by: Shaun Hamilton <51722130+ShaunSHamilton@users.noreply.github.com>
* fix(curriculum): specify id attribute in the instructions
* Update curriculum/challenges/english/03-front-end-libraries/jquery/remove-an-element-using-jquery.md
Co-authored-by: Shaun Hamilton <51722130+ShaunSHamilton@users.noreply.github.com>
Co-authored-by: Shaun Hamilton <51722130+ShaunSHamilton@users.noreply.github.com>
* fix: re-arranged paragraph in react-redux lesson
* fix: re-arranged paragraph in react-redux lesson in different locales
* fix: reverted other locale changes
* fix: switched link to enable opening as a new tab
* fix(curriculum) replace single-line blocks with multi-line blocks for Front End Libraries #41523
Second attempt
* Update curriculum/challenges/english/03-front-end-libraries/react/use--for-a-more-concise-conditional.md
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
* fix: remove isHidden flag from frontmatter
* fix: add isUpcomingChange
Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
* feat: hide blocks not challenges
Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
* fix(curriculum): regex to target html elements using jQuery to capture white spaces
* replace whitespace before test
* fix linting issue with single quotes
Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>
* Proposed change to remove whitespace for issue #39370
Issue #39370: whitespace fails the 3rd test with test comparing to a no whitespace example.
Proposed: remove all whitespace in between tags(or literally all whitespaces) before comparing it with the no whitespace example
* Update render-state-in-the-user-interface.english.md
* Updated proposed change to remove whitespace
An update to previously proposed change due to failed test of 'unexpected token \'<\'' was thrown'
* Update curriculum/challenges/english/03-front-end-libraries/react/render-state-in-the-user-interface.english.md
Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>
* fix: linting issue
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>
* fix: resolve#39301
Add a test to check the "MyComponent" constructor's parameters (params) and to check that the super function exists in the constructor.
* docs: describe the test better
* Update curriculum/challenges/english/03-front-end-libraries/react/write-a-react-component-from-scratch.english.md
Co-authored-by: Nicholas Carrigan <nhcarrigan@gmail.com>
Co-authored-by: Parth Parth <34807532+thecodingaviator@users.noreply.github.com>
Co-authored-by: Nicholas Carrigan <nhcarrigan@gmail.com>
* fix:Incorrect Usaage of setState in React Challenge
* apply suggestion
* also set stage usage in other challenges
* fix setState usage in challenges
* correct syntax
* correct usage of useState in other files
* add current message to state
* remove current message from state
* change connect redux to the message app
* remove extra space
* remove MDN links from English challenges
* add push challenge reference to record-collection
* refactor truthy falsy verbiage
* replace MDN link with news link
* remove unnecessary whitespace
In the challenge seed renderOnline variable has been used and referenced but in the solution seed the variable has been changed to renderOnlineUser so, changed renderOnlineUsers back to renderOnline variable.