Giter Club home page Giter Club logo

integrate_week1_testing's Introduction

Testing: integrate, week 1

This week you will practice storing user input an array and finding saved values.

In this repository there are a few folders, these are the files & folders used in your project:

.
├── /lib
|   ├── chai.js
|   └── describe-it.js
├── /scripts
│   ├── /script-variables.js
│   └── /actions
│       ├── /display-found.js
│       ├── /find.js
│       ├── /push-to-array.js
├── /index.html
├── /LICENSE
├── /README.md
└── /style.css

The rest of the folders are code to study:

  • /example: a small fully-working project that uses an array to save user input

Your Tasks

Most of the code already works, the files you need to work in are listed below. Every other file already works correctly.

0. Study /example

1. push-to-array.js: Fill in the blanks

2. find.js: complete the function to pass the tests

3. display-found.js: Fill in the blank


How to DevTool

  • Always have your DevTools open. The debugger will be overwhelming at first, but very quickly you won't know how to work without it.
  • Set your debugger to pause on exceptions
  • Use breakpoints to step through the tests
  • Carefully read all console output, especially error messages. Errors aren't failure they are JavaScript trying to help you!
  • Expand errors to practice reading the callstack
  • Click on the line numbers to the right of console output to read the source code

Good Habits

  • Test your code all the time. Every time you make any changes read the test results in the console and click the buttons to see if they work
  • Make one change at a time. If you make many changes at once it's hard to know which one made a difference.

So a good workflow will be something like this (after the project is open in your browser):

  1. Click on the button you are studying
  2. Step through the handler in your debugger until you reach an error or something that does not work correctly
  3. Go to VSCode and make one small change to try fixing the bug, save your changes!
  4. Return to the browser, refresh, and click the same button
  5. Step through to the line of code that caused problems last time, is it fixed?
  6. repeat!

integrate_week1_testing's People

Contributors

koala-droid avatar yauh-ask avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.