Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Building Single-page Web Apps with Meteor
  • Toc
  • feedback
Building Single-page Web Apps with Meteor

Building Single-page Web Apps with Meteor

By : Fabian Vogelsteller
4.5 (8)
close
Building Single-page Web Apps with Meteor

Building Single-page Web Apps with Meteor

4.5 (8)
By: Fabian Vogelsteller

Overview of this book

If you are a web developer with basic knowledge of JavaScript and want to take on Web 2.0, build real-time applications, or simply want to write a complete application using only JavaScript and HTML/CSS, this is the book for you. This book is based on Meteor 1.0.
Table of Contents (15 chapters)
close
14
Index

Testing packages

In the previous chapter, we built a package out of the ReactiveTimer object. A good package should always contain unit tests so that people can run them and be sure that changes to that package don't break its functionality.

Meteor provides a simple unit test tool for packages, called TinyTest, which we will use to test our package:

  1. To add tests, we need to copy the meteor-book:reactive-timer package, which we built in the previous chapter, to the my-meteor-blog/packages folder of our app. This way, we can make changes to the package, as Meteor will prefer the package in the packages folder over one in its package servers. If you removed the package, simply add it back using the following command:
    $ meteor add meteor-book:reactive-timer
    

    Note

    Additionally, we need to make sure we delete the my-meteor-blog/client/ReactiveTimer.js file, which we should have if we used the code example from Chapter 10, Deploying Our App, as a basis.

  2. Then we open the package.js file from 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