muses-code-js / workshops-propositions

propositions for future js related workshops
1 stars 1 forks source link

Refactoring + unit tests #1

Open ButenkoT opened 7 years ago

ButenkoT commented 7 years ago
  1. Tools: JavaScript, unit tests (tape?)

  2. It is good to learn why unit tests are important and same time refactor your code and learn to not be afraid of deleting code and rewriting it.

  3. 2 levels:

    In 1st level we will have 2 files

    • file with unit tests
  1. We need a help with this workshop, all ideas and editions, suggestions are welcomed.

  2. It will require upper beginner level in JS.

@ronaldotijucas @mutsdagit @maggie-mu @rbychiang @ReenaRajani @kksy

kksy commented 7 years ago

Hi Tanya, I think this would be a great idea! I found that a lot of workshops out there talk about coding functionality, but not much on testing and writing clean code. Has work started with this?

Questions

Suggestions

ReenaRajani commented 7 years ago

@kksy, regarding your question on one file or seperate file per code smell, i think it would be better to have mixed code smells in one file. But depending on the complexity of the code smell we can move it to a new file if required.

A similar approach is followed in the coding dojo sessions, but what we do is take already existing katas and work on them..

And thanks for your suggestions :) Mocking and Stubbing is a good idea !!

ButenkoT commented 7 years ago

@kksy Thank you for suggestions. We still didn't start any work with this one. Regarding your question I think we can start with 4 files in total as described and then move on if we need any more.

Splitting code for files is also a part of refactoring - can be the last step of part 1, for example.