The challenge ES6: Use Destructuring Assignment with the Rest Operator to Reassign Array Elements, had slightly odd test descriptions and the tests didn't quite capture what they should. For example, if the user did not use a destructuring operator they'd be told 'destructuring was used.'. Also, the tests passed and failed some things they shouldn't. As mentioned in #281, returning an empty array would pass the first test. The second test required the use of the variable arr, which is not strictly necessary. Finally the third test would only fail if it found 'Array.slice' in the editor, but would pass let arr = list.slice(2).
This PR addresses those issue by slightly tweaking the text and tightening/relaxing the tests, as appropriate.
[x] Your pull request targets the dev branch.
[x] Branch starts with either fix/, feature/, or translate/ (e.g. fix/challenge-tests)
[x] All new and existing tests pass the command npm test.
[x] The changes were done locally on your machine and NOT GitHub web interface.
If they were done on the web interface you have ensured that you are creating conventional commit messages.
Checklist:
[x] Tested changes locally.
[x] Addressed currently open issue (replace XXXXX with an issue no in next line)
Description
The challenge ES6: Use Destructuring Assignment with the Rest Operator to Reassign Array Elements, had slightly odd test descriptions and the tests didn't quite capture what they should. For example, if the user did not use a destructuring operator they'd be told 'destructuring was used.'. Also, the tests passed and failed some things they shouldn't. As mentioned in #281, returning an empty array would pass the first test. The second test required the use of the variable
arr
, which is not strictly necessary. Finally the third test would only fail if it found 'Array.slice' in the editor, but would passlet arr = list.slice(2)
.This PR addresses those issue by slightly tweaking the text and tightening/relaxing the tests, as appropriate.
dev
branch.fix/
,feature/
, ortranslate/
(e.g.fix/challenge-tests
)npm test
.npm run commit
to generate a conventional commit message. Learn more here: https://conventionalcommits.org/#why-use-conventional-commitsChecklist:
Closes #281