Test Driven Development

Beschreibung

A-Level Application, build, testing and deployment (Test Driven Development) Notiz am Test Driven Development, erstellt von James Drummond am 14/12/2014.
James Drummond
Notiz von James Drummond, aktualisiert more than 1 year ago
James Drummond
Erstellt von James Drummond vor fast 10 Jahre
9
0

Zusammenfassung der Ressource

Seite 1

What are the aims / what is the point of TDD? One of the primary aims of unit testing is to isolate a method or component that you want to test and see how it behaves under a variety of circumstances. 

How to write testable Javascript: Externalize all javascript - don't write inline as it can't be tested. Provide a public interface - it's difficult to test private methods Use instantiable objects Flatten the pyramid of doom: avoid many nested levels of callbacks Separate DOM event handlers from the actions they perform: e.g. separate submit button click from form submit. Mock in XHR requests

The process of test driven development: You first write a test for a function before you write the function itself You create a failing test initially, rounding this out with passing tests. You then build the actual functionality of the function. Run the tests to see that you get the expected results. After that you wrinse and repeat.

New Page

Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Quiz - Object Oriented Javascript
arunram.krish
Examen Fundamentos Basicos de Programación
Jose Valderrama0721
Test I. Introduction to web technologies
Angel Martínez Rodriguez
JavaScript Fundamentals
Andrew Watters
Front-End Web Development
Chanthy Ngin
Javascript - Quiz - Jan 2016
arunram.krish
OpenSource Programming
Faheem Ahmed
Javascript basics
James Drummond
jQuery Basics functions and method
Victor Bini
Javascript Variables
Rene Escobar
JavaScript DOM API - Funções Basicas - Interactive Web Pages
Victor Bini