Test-Driven React, Second Edition: Find Problems Early, Fix Them Quickly, Code with Confidence

Burnham, Trevor

  • 出版商: Pragmatic Bookshelf
  • 出版日期: 2024-10-22
  • 售價: $1,940
  • 貴賓價: 9.5$1,843
  • 語言: 英文
  • 頁數: 174
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 9798888650653
  • ISBN-13: 9798888650653
  • 相關分類: TDD 測試導向開發
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Turn your React project requirements into tests and get the feedback you need faster than ever before. Combine the power of testing, linting, and typechecking directly in your coding environment to iterate on React components quickly and fearlessly!

You work in a loop: write code, get feedback, adjust. The faster you get feedback, the faster your code improves and the more effective you become as a developer. And that feedback comes from testing.

The conceptual elegance of React has opened the door to a new generation of web testing: clear, expressive, and lightning fast. That makes React a perfect fit for test-driven development (TDD), a methodology in which tests are a blueprint instead of an afterthought.

Each chapter presents new projects to challenge you and new tools to help you:

  • Write fast, easy-to-understand tests with Vitest and React Testing Library.
  • Keep your code tidy with ESLint and Prettier.
  • Perform every task you need from a single window within VS Code.
  • See your test output directly in your code with Wallaby.
  • Style components in a test-friendly way with styled-components.
  • Stay focused on what's important by running your tests continuously in the background.
  • Generate beautiful documentation with Storybook, and update it on every commit with GitHub Actions.
  • The second edition of Test-Driven React has been extensively revised to reflect the latest tools and techniques for React development, including TypeScript. Each chapter presents new projects to challenge you and new tools to help you find and fix type errors without even running your code.

    What You Need:

    You'll need a working knowledge of JavaScript or TypeScript, and a computer running macOS, Windows, or Linux.

    商品描述(中文翻譯)

    將您的 React 專案需求轉化為測試,並比以往更快獲得所需的反饋。將測試、靜態檢查和類型檢查的力量直接結合在您的編碼環境中,快速且無畏地迭代 React 元件!

    您在一個循環中工作:編寫代碼、獲取反饋、調整。獲得反饋的速度越快,您的代碼改進得越快,作為開發者的效率也會越高。而這些反饋來自於測試。

    React 的概念優雅性為新一代的網頁測試打開了大門:清晰、表達性強且快速如閃電。這使得 React 成為測試驅動開發(TDD)的完美選擇,這是一種將測試視為藍圖而非事後考量的方法論。

    每一章都呈現新的專案來挑戰您,並提供新的工具來幫助您:
    - 使用 Vitest 和 React Testing Library 編寫快速、易於理解的測試。
    - 使用 ESLint 和 Prettier 使您的代碼保持整潔。
    - 在 VS Code 的單一窗口中執行您所需的每一項任務。
    - 使用 Wallaby 直接在代碼中查看測試輸出。
    - 使用 styled-components 以測試友好的方式為元件設計樣式。
    - 通過在背景中持續運行測試,專注於重要的事情。
    - 使用 Storybook 生成美觀的文檔,並在每次提交時通過 GitHub Actions 更新它。

    《Test-Driven React》的第二版已進行廣泛修訂,以反映最新的 React 開發工具和技術,包括 TypeScript。每一章都呈現新的專案來挑戰您,並提供新的工具來幫助您在不運行代碼的情況下找到並修正類型錯誤。

    您需要的條件:
    您需要具備 JavaScript 或 TypeScript 的工作知識,以及運行 macOS、Windows 或 Linux 的電腦。