Meteor Testing and Data Handling with Velocity-Mocha and Reactive Class
Summary of my bookmarked Github repositories from Nov 12th, 2014
Github repositories
- mad-eye/meteor-mocha-web
velocity-mocha is a Meteor package that enables easy and secure execution of Mocha tests within Meteor. It utilizes the Velocity testing framework. An example test code is provided in CoffeeScript, where it verifies the functionality of a leaderboard by giving 5 points to a user and asserting the score. To set it up, you need to create a Meteor app using the leaderboard example, add CoffeeScript support, create a test directory, and save the test code. Test results can be viewed by accessing the app and clicking the Velocity icon. The package includes the chai assertion library for convenience. Additionally, instructions are given for testing a local installation of Mocha and running tests in Continuous Integration. For debugging server-side tests, the VELOCITY_DEBUG_MIRROR environment variable can be set.
- lingz/meteor-reactive-class
Reactive Class for Meteor is a library that allows for simple two-way data binding and object-oriented programming with Meteor collections. It provides data-backed classes that can maintain state without reinstantiating when the corresponding collection records are updated. The library acts as a database wrapper over MongoDB and enables easy management of data in an object-oriented way. Objects can be synchronized with the database using methods like `.update()` and `.refresh()`, and they can also listen for MongoDB updates and update themselves reactively. The library offers various options for customization, such as controlling reactivity and transforming collection queries. Overall, Reactive Class simplifies the handling of data and objects in Meteor applications.