lab-brussels-1 / home

Home repository for Lab Brussels 1.
https://lab-brussels-1.github.io/home
MIT License
4 stars 5 forks source link

alexanderism55: Behavior, Strategy, Implementation, 3 weeks #362

Open alexanderism55 opened 2 years ago

alexanderism55 commented 2 years ago

my fork "The directory is called bonus-doc-nurse"

Learning Objectives

Priorities: πŸ₯š, 🐣, πŸ₯, πŸ” (click to learn more)
There is a lot to learn in this repository. If you can't master all the material at once, that's expected! Anything you don't master now will always be waiting for you to review when you need it. These 4 emoji's will help you prioritize your study time and to measure your progress: - πŸ₯š: Understanding this material is required, it covers the base skills you'll need to move on. You do not need to finish all of them but should feel comfortable that you could with enough time. - 🐣: You have started all of these exercises and feel you could complete them all if you just had more time. It may not be easy for you but with effort you can make it through. - πŸ₯: You have studied the examples and started some exercises if you had time. You should have a big-picture understanding of these concepts/skills, but may not be confident completing the exercises. - πŸ”: These concepts or skills are not necessary but are related to this module. If you are finished with πŸ₯š, 🐣 and πŸ₯ you can use the πŸ” exercises to push yourself without getting distracted from the module's main objectives. ---

1. Remix

Practice studying and remixing other people's solutions to coding challenges. Create your own solutions by mixing and matching pieces from other people's code.

2. Write

3. Review


alexanderism55 commented 2 years ago

Week 1

I Need Help With:

Sunday Prep Work

Interesting

} }`

danielhalasz commented 2 years ago
  • I use test instead of description, and i dont use an it statement. However i use equal and expected.

I hope this has become more clear yesterday..but all tests are supposed to follow the logic of describe>it/test>expect

danielhalasz commented 2 years ago

Also i coudnt export my function using 'module.exports = code ' and import using 'code = require './location'. When I did that, it said that require was not defined.

you can just put your function inside the test file now for simplicity..otherwise Jest does not support ES6 modules... and needs some workaround, if you have the function in a separate file..

npm install --save-dev @babel/preset-env

after that create the "babel.config.js" file in the root and that content should be as below

module.exports = {
  presets: ['@babel/preset-env', '@babel/preset-react'],
  env: {
    test: {
      plugins: ["@babel/plugin-transform-runtime"]
    }
  }
};
danielhalasz commented 2 years ago

I do not know why but I couldn't get the 'description', and the 'it' function rolling.

it is just supposed to be a description of what you are doing, a bit like a comment

alexanderism55 commented 2 years ago

Week 2

I Need Help With:

Sunday Prep Work

danielhalasz commented 2 years ago
  • Nothing so far everything is going super smooth. I did 424 tests which super cool.

wow, nice job Alex πŸ’ͺ

danielhalasz commented 2 years ago
  • Syntax for the test is very easy to break and can get really confusing, i broke the test so many times.

yes, I feel your pain..many brackets and curly braces πŸ™‚ it is good practice though! you will be a master spotter