Test-Driven JavaScript DevelopmentAddison-Wesley Professional, 09.09.2010 - 528 Seiten For JavaScript developers working on increasingly large and complex projects, effective automated testing is crucial to success. Test-Driven JavaScript Development is a complete, best-practice guide to agile JavaScript testing and quality assurance with the test-driven development (TDD) methodology. Leading agile JavaScript developer Christian Johansen covers all aspects of applying state-of-the-art automated testing in JavaScript environments, walking readers through the entire development lifecycle, from project launch to application deployment, and beyond. Using real-life examples driven by unit tests, Johansen shows how to use TDD to gain greater confidence in your code base, so you can fearlessly refactor and build more robust, maintainable, and reliable JavaScript code at lower cost. Throughout, he addresses crucial issues ranging from code design to performance optimization, offering realistic solutions for developers, QA specialists, and testers. Coverage includes • Understanding automated testing and TDD • Building effective automated testing workflows • Testing code for both browsers and servers (using Node.js) • Using TDD to build cleaner APIs, better modularized code, and more robust software • Writing testable code • Using test stubs and mocks to test units in isolation • Continuously improving code through refactoring • Walking through the construction and automated testing of fully functional software The accompanying Web site, tddjs.com, contains all of the book’s code listings and additional resources. |
Andere Ausgaben - Alle anzeigen
Häufige Begriffe und Wortgruppen
added addMessage addObserver Ajax ajax.create ajax.get ajax.request array assertions asynchronous Automated Testing Browser Sniffing callback Chapter chat client closure configuration constructor create cross-browser defined Development in JavaScript DOM event ECMAScript element error event handler Expecting fake feature detection feature tests formal parameters function expressions global object handleSubmit headers helper implementation interface Internet Explorer jQuery JSON JsTestDriver long polling loop memoize method mocks namespace Node.js Object.create observers pass the test poller production code Prototypal Inheritance prototype chain Real-World Test-Driven Development refactoring request run tests Running the tests scope chain script seen in Listing server Server-Side JavaScript setup setView shows the updated simple single responsibility principle strftime strict mode string stub tabbed panel test fails test passes test runner test-driven development testing framework unit tests unobtrusive JavaScript user form variable verify writing XMLHttpRequest object xUnit