Giter Club home page Giter Club logo

testing's Introduction

Testing

<< Week 3 | Main Page | Week 1 >>

All code is guilty until proven innocent.

Program testing can be a very effective way to show the presence of bugs, but is hopelessly inadequate for showing their absence.

Contents


Learning Objectives

Programming Skills

  • Learning from Code
    • Reading & understanding source code
    • Making small, incremental experiments
    • Copying & modifying others' code
  • Using assertion libraries
    • Failed assertions throw errors!
    • Deep equality
    • Strict equality
    • Throws
  • Using test reporters
    • describe
    • it
  • TDD
    • Trust the tests!
    • Solving challenges one test at a time
  • Debugging
    • Reading test results to debug code behavior
    • Interpreting assertion errors

Isolating JavaScript

  • JS Operators
    • Implicit Coercion
    • Operator Precedence
  • Control flow
    • for in, for of
    • break, continue
  • Reference vs. Value
    • Comparing arrays & objects
    • Avoiding side-effects
  • Arrays
    • Reading & writing entries
    • Array methods
  • Objects
    • Reading and writing entries
    • Dot vs. Bracket access
    • Object.keys, .values, .entries
  • Functions
    • The callstack
    • Recursion

Integrating JavaScript

  • Sharing arrays and objects between handler functions by reference

TOP


Study Tips

  • Don't rush, understand! Programming is hard.
    • The examples and exercises will still be there to study later.
    • It's better to fail tests slowly and learn from your mistakes than to pass tests quickly and not understand why.
  • Practice Pair Programming: two people, one computer.
  • Don't skip the examples! Understanding and experimenting with working code is a very effective way to learn programming.
  • Take a look through the Learning From Code guide for more study tips

TOP


Module Projects

Projects in this module will be simple websites with onclick attributes that call a handler function.

  • User interactions will be handled with prompt, confirm and alert
  • Handler functions will use arrays and objects stored in script variables
  • There will be tests

TOP


How to Study This

Locally on your computer

  1. Clone this repo
  2. Open the directory in terminal
  3. npm run start (no need to install)
  4. Open localhost:3000 in your browser
  5. Learn

Live on hackyourfuture.be

  1. Install markdown-viewer
  2. Add origin hackyourfuture.be
  3. Learn

TOP

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.