Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Svelte with Test-Driven Development
Svelte with Test-Driven Development

Svelte with Test-Driven Development: Advance your skills and write effective automated tests with Vitest, Playwright, and Cucumber.js

eBook
$27.99
Paperback
$34.99
Subscription
Free Trial
Renews at $12.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Key benefits

  • Understand and master the test-driven development (TDD) workflow
  • Explore the principles of unit testing with Vitest and end-to-end testing using Playwright and Cucumber.js
  • Leverage practical examples of unit tests covering a range of SvelteKit framework features

Description

Svelte is a popular front-end framework used for its focus on performance and user-friendliness, and test-driven development (TDD) is a powerful approach that helps in creating automated tests before writing code. By combining them, you can create efficient, maintainable code for modern applications. Svelte with Test-Driven Development will help you learn effective automated testing practices to build and maintain Svelte applications. In the first part of the book, you’ll find a guided walkthrough on building a SvelteKit application using the TDD workflow. You’ll uncover the main concepts for writing effective unit test cases and practical advice for developing solid, maintainable test suites that can speed up application development while remaining effective as the application evolves. In the next part of the book, you’ll focus on refactoring and advanced test techniques, such as using component mocks and writing BDD-style tests with the Cucumber.js framework. In the final part of the book, you’ll explore how to test complex application and framework features, including authentication, Svelte stores, and service workers. By the end of this book, you’ll be well-equipped to build test-driven Svelte applications by employing theoretical and practical knowledge.

Who is this book for?

This book is an essential guide for Svelte developers seeking to enhance their development process by learning the TDD workflow and its application. Whether you are an experienced developer or new to automated testing, this book helps you gain a practical approach to improving your workflow. The examples are written in JavaScript, making them accessible to all developers, including TypeScript developers.

What you will learn

  • Create clear and concise Vitest unit tests helping the implementation of Svelte components
  • Use Playwright and Cucumber.js to develop end-to-end tests that simulate user interactions and test the functionality of your application
  • Leverage component mocks to isolate and test individual components
  • Write unit tests for a range of Svelte framework features
  • Explore effective refactoring techniques to keep your Svelte application code and test suites clean
  • Build high-quality Svelte applications that are well-tested, performant, and resilient to changes

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 30, 2023
Length: 250 pages
Edition : 1st
Language : English
ISBN-13 : 9781837630950
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jun 30, 2023
Length: 250 pages
Edition : 1st
Language : English
ISBN-13 : 9781837630950
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$12.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$129.99 billed annually
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$179.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 109.97
SvelteKit Up and Running
$34.99
Svelte with Test-Driven Development
$34.99
Real-World Svelte
$39.99
Total $ 109.97 Stars icon
Visually different images

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.9
(10 Ratings)
5 star 90%
4 star 10%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Tim Hildegard Jul 31, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I liked the book very much. There aren't that many resources on the topic of TDD for Svelte, and the book does a nice job of showing how to use Vitest and Playwright.The book mostly uses numbered lists to show how to build up the tests and code in Red-Pass-Refactor cycles. It starts off with simple tests, and then gradually increases the complexity.The tests are all based on reasonably realistic examples, which makes the easy to port to one's own projects. On the flipside, the book can become a little repetitive, since the testing is very thorough and all code is shown. But I preferred that over having incomplete examples.
Amazon Verified review Amazon
Wes W. Jul 10, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
As someone who actively embraces TDD principles, I can confidently say that this book has been a remarkable addition to my testing journey. It covers a wide range of topics, including setting up the development environment, writing unit tests with Vitest, performing end-to-end tests with Playwright, and more. The practical examples and clear explanations have greatly enhanced my understanding of test-driven development and not just with Svelte. The availability of GitHub examples further enriches the learning experience, making it easier to put the concepts into practice. If you want a comprehensive understanding of how to effectively implement TDD then this book is an essential resource.
Amazon Verified review Amazon
Dylan Hildenbrand Aug 11, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Having tests to ensure code is behaving as expected is a great practice that can sometimes be tricky to implement. This book clearly demonstrates not only how to get started but how to ensure consistent practices are followed, leading to more reliable code. There are lots of different resources out there that explain testing but in my opinion, this book should be considered the definitive guide to testing SvelteKit applications.The book starts by introducing some basic testing concepts and helping the reader setup the environment to code alongside. It's highly recommended to run the code along with the book, but if you'd prefer simply to peruse it, there is a very well organized GitHub repository provided with all code samples. After introducing some basic tests, the complexity is gradually increased while the book demonstrates various testing and code refactoring techniques and practical examples. By the end of the book, I felt comfortable with testing some more advanced functionality like authentication and service workers. I can't wait to begin implementing everything taught here. I fully expect to be referring to this book very frequently throughout the refactoring process of my own applications.
Amazon Verified review Amazon
Ralph J. Gorham Jul 11, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
My first impressions of this book is that is good so far. I have recently started doing more end to end and unit testing in my development so this book has come at the right time. I look forward to finish the rest of it and use a reference in the future. Also, it is great to see more books in the Svelte ecosystem, that is always nice.
Amazon Verified review Amazon
Jason Louv Jul 23, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is an absolute godsend. As anyone who has worked with SvelteKit knows, it's light years ahead of React, beloved by developers, fast as all get out, fun to write... but is barely documented compared to more established frameworks. It's really Svelte/SvelteKit's only downside. I spent literally months trying to figure out TDD with Svelte by asking on various forums and struggling to watch incomprehensible YouTubes, to no avail. And here comes this book—it's the missing manual that should come with SvelteKit's bundled testing frameworks. Thank you Daniel - this is the missing piece!
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.