Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Getting Started with Grunt: The JavaScript Task Runner
  • Table Of Contents Toc
  • Feedback & Rating feedback
Getting Started with Grunt: The JavaScript Task Runner

Getting Started with Grunt: The JavaScript Task Runner

By : Jaime Pillora, Bocoup LLC
4.4 (10)
close
close
Getting Started with Grunt: The JavaScript Task Runner

Getting Started with Grunt: The JavaScript Task Runner

4.4 (10)
By: Jaime Pillora, Bocoup LLC

Overview of this book

Table of Contents (12 chapters)
close
close

Testing with Grunt


Performing automated tests is another major use case for Grunt. Let us say our build process involves compiling, analyzing, optimizing, and then deploying our application. This sequential nature of Grunt is useful because if any link in the above process fails, Grunt will not proceed, that is, any subsequent tasks will not be run. This is important because it prevents our analysis tasks from running when our build tasks fail to create the files that we need to analyze. However, static analysis won't spot logical errors in our build files, therefore we may still be deploying a buggy application despite a successful build. We can work towards preventing this by including a test suite to our application –placing our new test task before our deploy task. Even if we have a Quality Assurance (QA) team, which manually tests our application, using a test suite can save QA iterations by quickly catching logic errors.

A test suite is also useful for trapping regression errors. Our...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete