koans
. Try to understand how JavaScript works with values and references through a series of koans.valueAndReference
. Uncomment the tests with correct result for koans in order that everything will work.implementationChange
. Make ShoppingCart that will work with a list of prices instead of only one price.signatureChange
. Try different levels:- At
CsvBuilder
, remove middle method - Use parallel change for use an object value
ID
instead ofnumber
atAuthenticationService
. - Try to make it been smart: using parallel change + inline and finally a parameter object
- Try to change the Player constructor for having only one.
- At
implementationChange
:- at ShoppingCart, try to use
Price
, instead ofnumber
- change all methods related to price as
number
in order to usePrice
- parallel implementation and manual replacement of callers
- parallel implementation + inline method
- wrap return object
- at ShoppingCart, try to use
moveResponsability
:- God class
- use extract delegate to move them to a new class
- add parameter + make static + convert to instance
- create class dependency + move + encapsulate field + inline
- pull down
- InvoiceService - feature envy:
- make static + move + convert to instance
- extract parameter + move
- extract method + move
- remove InvoiceService automatically
- inheritance + create default constructor + inline constructor
- God class
dependencyChange
:- Detect smell at package
- Invert the dependency from Finder to UserRepository
Node v22 is required to run this project.
💡If you don't have it installed, we recommend the use of a version manager like nvm or fnm (a cross-platform alternative to nvm). After installing the manager, you can install the Node version by running:
nvm use
orfnm use
.
Once you have Node installed, you can install the project dependencies by running:
npm install
This project uses the following plugins:
ℹ️ If VSCode is your editor of choice, you can install the recommended extensions.
You can run the tests by running:
npm run test
If you want to run the tests in watch mode, you can run:
npm run test:watch
Also, you can run the tests with coverage by running:
npm run test:coverage