Git Product home page Git Product logo

real-time-development-with-meteor's Introduction

Real Time Development (RTD) with Meteor

If you haven't already, you might want to take a look at the RTD blurb.

This is a template project exemplifying RTD with Meteor.

What you get:

  • Meteor unit testing with Jasmine, with all the necessary stubbing that isolates units of code
  • Compile-time test coverage using Istanbul
  • File watcher runs all tests and coverage reports (thanks to Karma)
  • End-to-end acceptance testing with WebdriverJS + PhantomJS/GhostDriver running against separate synchronized Meteor instance with it's own database

What being worked on right now:

  • File watcher updates browser windows showing acceptance test/coverage reports
  • Combined code coverage report from both unit and acceptance test runs (to give a true indication of test coverage)
  • Growl notifications

What planned eventually:

  • TeamCity pre-tested (delayed) commit
  • Blue/Green release process to AWS
  • Multi-node replica set MongoDB on AWS
  • Horizontally scaled Meteor servers on AWS

How does it work?

  • Karma is configured with file watchers, Jasmine (can easily be switched to Mocha), console reporter and test coverage
  • Retrofitted unit and acceptance tests around the Meteor leaderboard example app demonstrating 100% test coverage
  • Templates stub that expose attributes, functions and events to unit tests
  • Model stub that allows Jasmine spies to spy and assert
  • Meteor stub with hooks into the Meteor.xyz methods
  • Session stub with get/set methods
  • Collection stub that allows you to count the number of times a collection has been initialized
  • Grunt script that keeps a parallel instance of meteor updates with code changes dedicated to acceptance tests
  • A grunt task that runs all of the above together

Instructions

Ensure you have Meteor installed:

  curl https://install.meteor.com | /bin/sh

You'll need node

You should also have these installed globally:

  npm install -g karma
  npm install -g phantomjs
  npm install -g selenium-webdriver

Clone this project's git repo, cd into the /test directory and run:

  npm install
  grunt

Enjoy seeing unit tests, acceptance tests and coverage feedback as well as app updates every time you save a file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.