You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In seeing students solve the current (new) JS foundations, some of the tests cannot be passed without creating an impure function. None of the tests should require this.
Summary of Changes
Solve all the existing JS foundations, looking for spaces where the test cannot be solved without creating an impure function
Refactor/replace any tests that require the creation of an impure function
Notes
Testing for the side effect of a function is an example of this. If you encounter a test where it is expected that something has changed as the result of running a function, but that function didn't return anything, it's a side effect, and needs to go away.
This issue will require changes to the JS Foundations repo, even tho the issue is linked to front-end-curriculum. Please make sure to make your PR there, and link the PR in a comment below.
The text was updated successfully, but these errors were encountered:
it.skip('should rack up a bill',function(){varnik=createCustomer('Nik',0,[])varfootMassage=createService('foot massage',65)varfacial=createService('facial',50)varnikFootMassage=bookServices(nik,footMassage)varnikFacial=bookServices(nik,facial)assert.deepEqual(nikFootMassage.bookings,['foot massage','facial'])assert.deepEqual(nikFacial.bill,115)})
Where you'd have to push the service into nik when bookServices is invoked in order for nikFootMassage and nikFacial to be connected.
Notes for me:
I'm also going to be keeping an eye on on wether or not to put them in any order.
Might also fix some things like mis-named tests, confusing themes (vhs), file names
Description
In seeing students solve the current (new) JS foundations, some of the tests cannot be passed without creating an impure function. None of the tests should require this.
Summary of Changes
Notes
The text was updated successfully, but these errors were encountered: